mirror of
https://github.com/hashicorp/terraform.git
synced 2026-02-03 20:50:59 -05:00
we can't savely detect deprecations within provisioners during plan
This commit is contained in:
parent
7eaf6daf60
commit
3bafac0d56
1 changed files with 24 additions and 0 deletions
|
|
@ -2836,6 +2836,30 @@ func TestContext2Validate_deprecatedAttr(t *testing.T) {
|
|||
},
|
||||
})
|
||||
},
|
||||
expectedPlanDiags: func(c *configs.Config) tfdiags.Diagnostics {
|
||||
return tfdiags.Diagnostics{} // We can not connect this during planning
|
||||
},
|
||||
expectedApplyDiags: func(c *configs.Config) tfdiags.Diagnostics {
|
||||
return tfdiags.Diagnostics{}.Append(&hcl.Diagnostic{
|
||||
Severity: hcl.DiagWarning,
|
||||
Summary: `Deprecated value used`,
|
||||
Detail: `deprecated resource attribute used`,
|
||||
Subject: &hcl.Range{
|
||||
Filename: filepath.Join(c.Module.SourceDir, "main.tf"),
|
||||
Start: hcl.Pos{Line: 6, Column: 36, Byte: 177},
|
||||
End: hcl.Pos{Line: 6, Column: 57, Byte: 198},
|
||||
},
|
||||
}).Append(&hcl.Diagnostic{
|
||||
Severity: hcl.DiagWarning,
|
||||
Summary: `Deprecated value used`,
|
||||
Detail: `deprecated resource attribute used`,
|
||||
Subject: &hcl.Range{
|
||||
Filename: filepath.Join(c.Module.SourceDir, "main.tf"),
|
||||
Start: hcl.Pos{Line: 9, Column: 26, Byte: 284},
|
||||
End: hcl.Pos{Line: 9, Column: 47, Byte: 305},
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
"in action config": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue