configs: Disable deprecation warning for quoted keywords/references
Although we do still consider these deprecated for 0.12, we'll defer actually generating warnings for them until a later minor release so that module authors can retain their quoted identifiers for a period after 0.12 release for backward-compatibility with Terraform 0.11.
This commit is contained in:
parent
a26ff56f01
commit
c05a1050fc
|
@ -59,6 +59,12 @@ func shimTraversalInString(expr hcl.Expression, wantKeyword bool) (hcl.Expressio
|
|||
)
|
||||
diags = append(diags, tDiags...)
|
||||
|
||||
// For initial release our deprecation warnings are disabled to allow
|
||||
// a period where modules can be compatible with both old and new
|
||||
// conventions.
|
||||
// FIXME: Re-enable these deprecation warnings in a release prior to
|
||||
// Terraform 0.13 and then remove the shims altogether for 0.13.
|
||||
/*
|
||||
if wantKeyword {
|
||||
diags = append(diags, &hcl.Diagnostic{
|
||||
Severity: hcl.DiagWarning,
|
||||
|
@ -74,6 +80,7 @@ func shimTraversalInString(expr hcl.Expression, wantKeyword bool) (hcl.Expressio
|
|||
Subject: &srcRange,
|
||||
})
|
||||
}
|
||||
*/
|
||||
|
||||
return &hclsyntax.ScopeTraversalExpr{
|
||||
Traversal: traversal,
|
||||
|
|
|
@ -99,11 +99,6 @@ func TestParserLoadConfigFileFailureMessages(t *testing.T) {
|
|||
hcl.DiagError,
|
||||
"Invalid variable type hint",
|
||||
},
|
||||
{
|
||||
"valid-files/variable-type-quoted.tf",
|
||||
hcl.DiagWarning,
|
||||
"Quoted keywords are deprecated",
|
||||
},
|
||||
{
|
||||
"invalid-files/unexpected-attr.tf",
|
||||
hcl.DiagError,
|
||||
|
@ -119,16 +114,6 @@ func TestParserLoadConfigFileFailureMessages(t *testing.T) {
|
|||
hcl.DiagError,
|
||||
"Unsuitable value type",
|
||||
},
|
||||
{
|
||||
"valid-files/resources-dependson-quoted.tf",
|
||||
hcl.DiagWarning,
|
||||
"Quoted references are deprecated",
|
||||
},
|
||||
{
|
||||
"valid-files/resources-ignorechanges-quoted.tf",
|
||||
hcl.DiagWarning,
|
||||
"Quoted references are deprecated",
|
||||
},
|
||||
{
|
||||
"valid-files/resources-ignorechanges-all-legacy.tf",
|
||||
hcl.DiagWarning,
|
||||
|
@ -139,16 +124,6 @@ func TestParserLoadConfigFileFailureMessages(t *testing.T) {
|
|||
hcl.DiagWarning,
|
||||
"Deprecated ignore_changes wildcard",
|
||||
},
|
||||
{
|
||||
"valid-files/resources-provisioner-when-quoted.tf",
|
||||
hcl.DiagWarning,
|
||||
"Quoted keywords are deprecated",
|
||||
},
|
||||
{
|
||||
"valid-files/resources-provisioner-onfailure-quoted.tf",
|
||||
hcl.DiagWarning,
|
||||
"Quoted keywords are deprecated",
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
|
Loading…
Reference in New Issue