core: NewInstanceInfo now produces correct "id" for data resources
We need to mimic the old API here, and we weren't doing that quite right since the "data" prefix was missing from data resources.
This commit is contained in:
parent
299fe25a04
commit
cc5b1d452f
|
@ -132,6 +132,9 @@ func NewInstanceInfo(addr addrs.AbsResource) *InstanceInfo {
|
|||
// determine from an InstanceInfo alone whether it is a managed or data
|
||||
// resource that is being referred to.
|
||||
id := fmt.Sprintf("%s.%s", addr.Resource.Type, addr.Resource.Name)
|
||||
if addr.Resource.Mode == addrs.DataResourceMode {
|
||||
id = "data." + id
|
||||
}
|
||||
|
||||
return &InstanceInfo{
|
||||
Id: id,
|
||||
|
|
Loading…
Reference in New Issue