mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
terraform: guard against a nil resource
This commit is contained in:
parent
23285aed76
commit
1ddf5bfc5f
@ -1415,7 +1415,9 @@ func (c *walkContext) computeVars(
|
||||
case *config.CountVariable:
|
||||
switch v.Type {
|
||||
case config.CountValueIndex:
|
||||
vs[n] = strconv.FormatInt(int64(r.CountIndex), 10)
|
||||
if r != nil {
|
||||
vs[n] = strconv.FormatInt(int64(r.CountIndex), 10)
|
||||
}
|
||||
}
|
||||
case *config.ModuleVariable:
|
||||
value, err := c.computeModuleVariable(v)
|
||||
|
Loading…
Reference in New Issue
Block a user