fix computed set keys in shims
When generated a config, the computed set keys were missing the leading set name.
This commit is contained in:
parent
8d302c5bd2
commit
c37147d876
|
@ -297,14 +297,14 @@ func newResourceConfigShimmedComputedKeys(obj cty.Value, schema *configschema.Bl
|
||||||
i := 0
|
i := 0
|
||||||
for it := blockVal.ElementIterator(); it.Next(); i++ {
|
for it := blockVal.ElementIterator(); it.Next(); i++ {
|
||||||
_, subVal := it.Element()
|
_, subVal := it.Element()
|
||||||
subPrefix := fmt.Sprintf("%s%d.", prefix, i)
|
subPrefix := fmt.Sprintf("%s.%s%d.", typeName, prefix, i)
|
||||||
keys := newResourceConfigShimmedComputedKeys(subVal, &blockS.Block, subPrefix)
|
keys := newResourceConfigShimmedComputedKeys(subVal, &blockS.Block, subPrefix)
|
||||||
ret = append(ret, keys...)
|
ret = append(ret, keys...)
|
||||||
}
|
}
|
||||||
case configschema.NestingMap:
|
case configschema.NestingMap:
|
||||||
for it := blockVal.ElementIterator(); it.Next(); {
|
for it := blockVal.ElementIterator(); it.Next(); {
|
||||||
subK, subVal := it.Element()
|
subK, subVal := it.Element()
|
||||||
subPrefix := fmt.Sprintf("%s%s.", prefix, subK.AsString())
|
subPrefix := fmt.Sprintf("%s.%s%s.", typeName, prefix, subK.AsString())
|
||||||
keys := newResourceConfigShimmedComputedKeys(subVal, &blockS.Block, subPrefix)
|
keys := newResourceConfigShimmedComputedKeys(subVal, &blockS.Block, subPrefix)
|
||||||
ret = append(ret, keys...)
|
ret = append(ret, keys...)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue