I am using terraform 0.11 for a custom module implementation of terraform-aws-provider. Inside the module there are a lot of unquoted resource value assignments that make me confused since they are not working.
This is the sample module code that I am using
resource "aws_iam_policy" "example" {
name = example_policy
policy = data.aws_iam_policy_document.example.json
}
In the official terraform documentation, it was given with interpolation around the value to become
resource "aws_iam_policy" "example" {
name = "example_policy"
policy = "${data.aws_iam_policy_document.example.json}"
}
from: https://www.terraform.io/docs/providers/aws/d/iam_policy_document.html
When I tried to do terraform get
the following error message came up: Unknown token: 39:24 IDENT data.aws_iam_policy_document.example.json
, and when I tried to use terraform 0.12, it managed to fetch it correctly.
Is this unquoted resource value exclusive to terraform > v0.12?