@@ -2836,6 +2836,30 @@ func TestContext2Validate_deprecatedAttr(t *testing.T) {
28362836 },
28372837 })
28382838 },
2839+ expectedPlanDiags : func (c * configs.Config ) tfdiags.Diagnostics {
2840+ return tfdiags.Diagnostics {} // We can not connect this during planning
2841+ },
2842+ expectedApplyDiags : func (c * configs.Config ) tfdiags.Diagnostics {
2843+ return tfdiags.Diagnostics {}.Append (& hcl.Diagnostic {
2844+ Severity : hcl .DiagWarning ,
2845+ Summary : `Deprecated value used` ,
2846+ Detail : `deprecated resource attribute used` ,
2847+ Subject : & hcl.Range {
2848+ Filename : filepath .Join (c .Module .SourceDir , "main.tf" ),
2849+ Start : hcl.Pos {Line : 6 , Column : 36 , Byte : 177 },
2850+ End : hcl.Pos {Line : 6 , Column : 57 , Byte : 198 },
2851+ },
2852+ }).Append (& hcl.Diagnostic {
2853+ Severity : hcl .DiagWarning ,
2854+ Summary : `Deprecated value used` ,
2855+ Detail : `deprecated resource attribute used` ,
2856+ Subject : & hcl.Range {
2857+ Filename : filepath .Join (c .Module .SourceDir , "main.tf" ),
2858+ Start : hcl.Pos {Line : 9 , Column : 26 , Byte : 284 },
2859+ End : hcl.Pos {Line : 9 , Column : 47 , Byte : 305 },
2860+ },
2861+ })
2862+ },
28392863 },
28402864
28412865 "in action config" : {
0 commit comments