From b1d731bd6f24a1aab2ede549a46bf2b9c93be68e Mon Sep 17 00:00:00 2001 From: Joel Moss Date: Wed, 14 Oct 2015 19:05:38 +0100 Subject: [PATCH] [chef provisioning] When use_policyfile is given, the run list is not used, so don't require it --- builtin/provisioners/chef/resource_provisioner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/provisioners/chef/resource_provisioner.go b/builtin/provisioners/chef/resource_provisioner.go index 7b94486d2..50b5666ee 100644 --- a/builtin/provisioners/chef/resource_provisioner.go +++ b/builtin/provisioners/chef/resource_provisioner.go @@ -180,7 +180,7 @@ func (r *ResourceProvisioner) Validate(c *terraform.ResourceConfig) (ws []string if p.NodeName == "" { es = append(es, fmt.Errorf("Key not found: node_name")) } - if p.RunList == nil { + if !p.UsePolicyfile && p.RunList == nil { es = append(es, fmt.Errorf("Key not found: run_list")) } if p.ServerURL == "" {