mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-26 00:41:27 -06:00
terraform: fix some count validation
This commit is contained in:
parent
863b9a4f45
commit
98eb9a1f19
@ -41,8 +41,11 @@ func (n *EvalValidateCount) Eval(
|
||||
|
||||
count, err = n.Resource.Count()
|
||||
if err != nil {
|
||||
errs = append(errs)
|
||||
goto RETURN
|
||||
// If we can't get the count during validation, then
|
||||
// just replace it with the number 1.
|
||||
c := n.Resource.RawCount.Config()
|
||||
c[n.Resource.RawCount.Key] = "1"
|
||||
count = 1
|
||||
}
|
||||
|
||||
if count < 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user