mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-15 19:22:46 -06:00
79dc808614
Terraform 0.12.0 removed the need for putting references and keywords in quotes, but we disabled the deprecation warnings for the initial release in order to avoid creating noise for folks who were intentionally attempting to maintain modules that were cross-compatible with both Terraform 0.11 and Terraform 0.12. However, with Terraform 0.12 now more widely used, the lack of these warnings seems to be causing newcomers to copy the quoted versions from existing examples on the internet, which is perpetuating the old and confusing quoted form in newer configurations. In preparation for phasing out these deprecated forms altogether in a future major release, and for the shorter-term benefit of giving better feedback to newcomers when they are learning from outdated examples, we'll now re-enable those deprecation warnings, and be explicit that the old forms are intended for removal in a future release. In order to properly test this, we establish a new set of test configurations that explicitly mark which warnings they are expecting and verify that they do indeed produce those expected warnings. We also verify that the "success" tests do _not_ produce warnings, while removing the ones that were previously written to succeed but have their warnings ignored.
12 lines
258 B
HCL
12 lines
258 B
HCL
resource "null_resource" "one" {
|
|
lifecycle {
|
|
ignore_changes = ["triggers"] # WARNING: Quoted references are deprecated
|
|
}
|
|
}
|
|
|
|
resource "null_resource" "all" {
|
|
lifecycle {
|
|
ignore_changes = ["*"] # WARNING: Deprecated ignore_changes wildcard
|
|
}
|
|
}
|