mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-16 19:00:27 -04:00
terraform: guard against a nil resource
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user