mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Update provider.go
Signed-off-by: keerthanamsys <149489753+keerthanamsys@users.noreply.github.com>
This commit is contained in:
parent
954e3aed01
commit
a4149cfa84
@ -187,8 +187,16 @@ func (p *Provider) decodeStaticFields(eval *StaticEvaluator) hcl.Diagnostics {
|
|||||||
|
|
||||||
p.Instances = make(map[addrs.InstanceKey]instances.RepetitionData)
|
p.Instances = make(map[addrs.InstanceKey]instances.RepetitionData)
|
||||||
for k, v := range forVal {
|
for k, v := range forVal {
|
||||||
p.Instances[addrs.StringKey(k)] = instances.RepetitionData{
|
// Convert boolean keys to strings
|
||||||
EachKey: cty.StringVal(k),
|
var keyStr string
|
||||||
|
switch k := k.(type) {
|
||||||
|
case bool:
|
||||||
|
keyStr = fmt.Sprintf("%v", k)
|
||||||
|
default:
|
||||||
|
keyStr = fmt.Sprintf("%v", k)
|
||||||
|
}
|
||||||
|
p.Instances[addrs.StringKey(keyStr)] = instances.RepetitionData{
|
||||||
|
EachKey: cty.StringVal(keyStr),
|
||||||
EachValue: v,
|
EachValue: v,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user