elmundio87 / terraform_validate

Assists in the enforcement of user-defined standards in Terraform
GNU General Public License v3.0
257 stars 43 forks source link

terraform interpolation support #39

Open karthikeayan opened 5 years ago

karthikeayan commented 5 years ago

Is there a plan to add support for Terraform Interpolations?

resource "aws_instance" "web" {
  ami           = "some_ami"
  instance_type = "t2.micro"

  tags = "${merge(var.tags, map("Name", "${var.cluster_name}-eks_cluster_sg"))}"
}

ERROR: test_aws_ebs_volume (main.TestEncryptionAtRest)

Traceback (most recent call last): File "check_tag.py", line 16, in test_aws_ebs_volume self.v.resources(tagged_resources).property('tags').should_have_properties(required_tags) File "/home/karthik/.local/lib/python2.7/site-packages/terraform_validate/terraform_validate.py", line 199, in should_have_properties property_names = property.property_value.keys() AttributeError: 'unicode' object has no attribute 'keys'


Ran 1 test in 0.043s

FAILED (errors=1)