mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-26 16:36:26 -06:00
configs: highlight resource name in diags when invalid
Previously we were erroneously highlighting the resource type name instead.
This commit is contained in:
parent
f825a2118b
commit
a26ff56f01
@ -63,7 +63,7 @@ func decodeResourceBlock(block *hcl.Block) (*ManagedResource, hcl.Diagnostics) {
|
||||
Severity: hcl.DiagError,
|
||||
Summary: "Invalid resource name",
|
||||
Detail: badIdentifierDetail,
|
||||
Subject: &block.LabelRanges[0],
|
||||
Subject: &block.LabelRanges[1],
|
||||
})
|
||||
}
|
||||
|
||||
@ -258,7 +258,7 @@ func decodeDataBlock(block *hcl.Block) (*DataResource, hcl.Diagnostics) {
|
||||
Severity: hcl.DiagError,
|
||||
Summary: "Invalid data resource name",
|
||||
Detail: badIdentifierDetail,
|
||||
Subject: &block.LabelRanges[0],
|
||||
Subject: &block.LabelRanges[1],
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user