From b62ff0412f2e03321f9b282e364f3d9dc077725f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 18 Jun 2014 21:14:34 -0700 Subject: [PATCH] terraform: apply works if no state is returned --- terraform/terraform.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/terraform/terraform.go b/terraform/terraform.go index fae41e5d3..5b760c14d 100644 --- a/terraform/terraform.go +++ b/terraform/terraform.go @@ -142,6 +142,12 @@ func (t *Terraform) applyWalkFn( return nil, err } + // If no state was returned, then no variables were updated so + // just return. + if rs == nil { + return nil, nil + } + // Update the resulting diff l.Lock() result.Resources[r.Id] = rs