configs: highlight resource name in diags when invalid

Previously we were erroneously highlighting the resource type name instead.
This commit is contained in:
Martin Atkins 2018-03-01 12:18:07 -08:00
parent f825a2118b
commit a26ff56f01
1 changed files with 2 additions and 2 deletions

View File

@ -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],
})
}