From 9bb678d76cb827ebee1bc8cc5496d15a3717e2b1 Mon Sep 17 00:00:00 2001 From: stack72 Date: Mon, 20 Feb 2017 19:14:13 +0200 Subject: [PATCH] provider/aws: Only send the Owner Account to Redshift cluster if not empty --- builtin/providers/aws/resource_aws_redshift_cluster.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_redshift_cluster.go b/builtin/providers/aws/resource_aws_redshift_cluster.go index 2c4604daf2..e9d4b2e1ee 100644 --- a/builtin/providers/aws/resource_aws_redshift_cluster.go +++ b/builtin/providers/aws/resource_aws_redshift_cluster.go @@ -277,7 +277,10 @@ func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{}) NodeType: aws.String(d.Get("node_type").(string)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), AutomatedSnapshotRetentionPeriod: aws.Int64(int64(d.Get("automated_snapshot_retention_period").(int))), - OwnerAccount: aws.String(d.Get("owner_account").(string)), + } + + if v, ok := d.GetOk("owner_account"); ok { + restoreOpts.OwnerAccount = aws.String(v.(string)) } if v, ok := d.GetOk("snapshot_cluster_identifier"); ok {