Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support first-class expressions for Terraform 0.12 #1301

Closed
sashee opened this issue Aug 14, 2019 · 0 comments · Fixed by #1303
Closed

Support first-class expressions for Terraform 0.12 #1301

sashee opened this issue Aug 14, 2019 · 0 comments · Fixed by #1303
Labels
bugfix-request A request for a bugfix to be developed.

Comments

@sashee
Copy link

sashee commented Aug 14, 2019

Name of the lexer
Terraform

Online example
Sorry, I couldn't save the paste. The server returned an error when I clicked "Save this"

Code sample

resource "aws_s3_bucket" "bucket" {
	force_destroy = "true"
}

resource "aws_config_config_rule" "rule" {
	name = "config-rule-${random_id.id.hex}"

	source {
		owner             = "AWS"
		source_identifier = "S3_BUCKET_SERVER_SIDE_ENCRYPTION_ENABLED"
	}

	scope {
		compliance_resource_id = aws_s3_bucket.bucket.id
		compliance_resource_types = ["AWS::S3::Bucket"]
	}
}

Screenshots
image

Additional context
Terraform 0.12 adds support for first-class expressions, so there is no need to use quotes.

Instead of compliance_resource_id = "${aws_s3_bucket.bucket.id}", compliance_resource_id = aws_s3_bucket.bucket.id is also correct, but the lexer highlights the dots as errors.

@sashee sashee added the bugfix-request A request for a bugfix to be developed. label Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix-request A request for a bugfix to be developed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant