Closed

Description
I tried to add the [https://github.com/terraform-aws-modules/terraform-aws-ec2-instance#make-an-encrypted-ami-for-use](code in the README) to the volume-attachment
example and I got this error:
√ (fix/initial-setup ↑3|…1); terraform plan
Warning: Interpolation-only expressions are deprecated
on main.tf line 88, in resource "aws_ami_copy" "ubuntu-xenial-encrypted-ami":
88: source_ami_id = "${data.aws_ami.ubuntu-xenial.id}"
Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.
Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.
Error: Unsupported block type
on main.tf line 92, in resource "aws_ami_copy" "ubuntu-xenial-encrypted-ami":
92: tags {
Blocks of type "tags" are not expected here. Did you mean to define argument
"tags"? If so, use the equals sign to assign it a value.
Trying to mess around (I know very little about how terraform work, still learning), I could not find an easy fix.
Metadata
Metadata
Assignees
Labels
No labels