From 98eb9a1f19c8aa0c70cce13191adf6b495516a8f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 10 Feb 2015 12:16:55 -0800 Subject: [PATCH] terraform: fix some count validation --- terraform/eval_validate.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/terraform/eval_validate.go b/terraform/eval_validate.go index 776d06d40..9be51fcf8 100644 --- a/terraform/eval_validate.go +++ b/terraform/eval_validate.go @@ -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 {