terraform: fix some count validation

This commit is contained in:
Mitchell Hashimoto 2015-02-10 12:16:55 -08:00
parent 863b9a4f45
commit 98eb9a1f19
1 changed files with 5 additions and 2 deletions

View File

@ -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 {