From 7b31c33b0b1df15876776fa5f0931e56178ecba0 Mon Sep 17 00:00:00 2001 From: Justin Clark Date: Wed, 20 Apr 2016 14:35:29 -0700 Subject: [PATCH] Adjust PR 6078 per catsby's request --- builtin/providers/aws/resource_aws_opsworks_stack.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_opsworks_stack.go b/builtin/providers/aws/resource_aws_opsworks_stack.go index aa7e0aeebe69..44748984d286 100644 --- a/builtin/providers/aws/resource_aws_opsworks_stack.go +++ b/builtin/providers/aws/resource_aws_opsworks_stack.go @@ -80,6 +80,7 @@ func resourceAwsOpsworksStack() *schema.Resource { "custom_cookbooks_source": &schema.Schema{ Type: schema.TypeList, Optional: true, + Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": &schema.Schema{ @@ -213,7 +214,7 @@ func resourceAwsOpsworksStackCustomCookbooksSource(d *schema.ResourceData) *opsw func resourceAwsOpsworksSetStackCustomCookbooksSource(d *schema.ResourceData, v *opsworks.Source) { nv := make([]interface{}, 0, 1) - if v != nil { + if v != nil && v.Type != nil && *v.Type != "" { m := make(map[string]interface{}) if v.Type != nil { m["type"] = *v.Type