Skip to content

configs: Deprecate nested redundant interpolations#26334

Merged
alisdair merged 1 commit intomasterfrom
alisdair/deprecate-nested-redundant-interpolation-expressions
Sep 22, 2020
Merged

configs: Deprecate nested redundant interpolations#26334
alisdair merged 1 commit intomasterfrom
alisdair/deprecate-nested-redundant-interpolation-expressions

Conversation

@alisdair
Copy link
Copy Markdown
Contributor

Previous deprecations only included direct assignment of template-only expressions to arguments. That is, this was not deprecated:

locals {
  foo = ["${var.foo}"]
}

This commit uses hclsyntax.VisitAll to detect and show deprecations for all template-only expressions, no matter how deep they are in a given expression.

Fixes #26331. Should be back-ported to 0.13 if merged, to go along with #26105.

Previous deprecations only included direct assignment of template-only
expressions to arguments. That is, this was not deprecated:

locals {
  foo = ["${var.foo}"]
}

This commit uses hclsyntax.VisitAll to detect and show deprecations for
all template-only expressions, no matter how deep they are in a given
expression.
@alisdair alisdair requested a review from a team September 22, 2020 17:46
@alisdair alisdair self-assigned this Sep 22, 2020
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 22, 2020

Codecov Report

Merging #26334 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
configs/compat_shim.go 93.65% <100.00%> (+0.31%) ⬆️
terraform/node_resource_plan.go 92.52% <0.00%> (-1.87%) ⬇️
helper/resource/state.go 84.68% <0.00%> (-0.91%) ⬇️
terraform/evaluate.go 50.33% <0.00%> (-0.23%) ⬇️
dag/marshal.go 54.79% <0.00%> (+1.36%) ⬆️

@alisdair alisdair merged commit 0a5f2d9 into master Sep 22, 2020
@alisdair alisdair deleted the alisdair/deprecate-nested-redundant-interpolation-expressions branch September 22, 2020 18:11
@ghost
Copy link
Copy Markdown

ghost commented Oct 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terraform Validate Does Not Warn On Interpolation In Lists

2 participants