-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Remove Interpolation-only expressions from website/docs files #36065
Conversation
Interpolation-only expressions are deprecated in Terraform v0.12.14 See. https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.10.0/docs/rules/terraform_deprecated_interpolation.md
89f7f37
to
f56b8db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @nimzo6689, thank you for taking the time to submit a PR and make these updates!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. It is true this syntax has long been deprecated.
We normally do not accept PRs which do cleanup across the codebase and nothing else for various reasons - mostly ones that have to do with git history and conflicts with pending PRs. However, I think in this particular case we could make an exception.
With that in mind, would you mind also addressing the remaining 7 cases?
./website/docs/language/backend/gcs.mdx: content = "${data.terraform_remote_state.foo.greeting}"
./website/docs/language/backend/s3.mdx: role_arn = "${var.workspace_iam_roles[terraform.workspace]}"
./website/docs/language/modules/develop/providers.mdx: credentials = "${file("account.json")}"
./website/docs/language/modules/develop/providers.mdx: credentials = "${file("account.json")}"
./website/docs/language/state/remote-state-data.mdx: subnet_id = "${data.terraform_remote_state.vpc.subnet_id}"
./website/docs/language/state/remote-state-data.mdx: subnet_id = "${data.terraform_remote_state.vpc.subnet_id}"
./website/docs/language/state/workspaces.mdx: count = "${terraform.workspace == "default" ? 5 : 1}"
@radeksimko
The reason these files were not modified is that they contain comments indicating they are written for Terraform <= 0.11, as shown below: # Terraform >= 0.12
resource "aws_instance" "foo" {
# ...
subnet_id = data.terraform_remote_state.vpc.outputs.subnet_id
}
# Terraform <= 0.11
resource "aws_instance" "foo" {
# ...
subnet_id = "${data.terraform_remote_state.vpc.subnet_id}"
} Since string interpolation became optional starting with Terraform v0.12, I decided to leave these lines unchanged. https://github.com/hashicorp/terraform/blob/v0.12/CHANGELOG.md
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍🏻
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Interpolation-only expressions are deprecated in Terraform v0.12.14.
See. terraform_deprecated_interpolation - tflint-ruleset-terraform
Fixes #36064
Target Release
1.x.x