New answers tagged

0

here is a complete example: resource "aws_key_pair" "my_key" { key_name = "my_key" public_key = file(pathexpand("~/.ssh/id_rsa.pub")) } resource "aws_instance" "example" { ami = my_ami instance_type = "t2.micro" key_name = aws_key_pair.my_key.key_name ebs_block_device { ...


0

Terraform Provisioners are a last resort, so I'd encourage you to think about other options first. In this case, your example suggests that you're already using cloud-init and so if at all possible I'd suggest modifying that cloud-init configuration to include a request to install the package you want to install. If you are using the cloud-config YAML format ...


Top 50 recent answers are included