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()
|
count, err = n.Resource.Count()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errs = append(errs)
|
// If we can't get the count during validation, then
|
||||||
goto RETURN
|
// just replace it with the number 1.
|
||||||
|
c := n.Resource.RawCount.Config()
|
||||||
|
c[n.Resource.RawCount.Key] = "1"
|
||||||
|
count = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if count < 0 {
|
if count < 0 {
|
||||||
|
|
Loading…
Reference in New Issue