provider/aws: Only send the Owner Account to Redshift cluster if not

empty
This commit is contained in:
stack72 2017-02-20 19:14:13 +02:00
parent ee9bcadbb9
commit 9bb678d76c
No known key found for this signature in database
GPG Key ID: 8619A619B085CB16
1 changed files with 4 additions and 1 deletions

View File

@ -277,7 +277,10 @@ func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{})
NodeType: aws.String(d.Get("node_type").(string)), NodeType: aws.String(d.Get("node_type").(string)),
PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)),
AutomatedSnapshotRetentionPeriod: aws.Int64(int64(d.Get("automated_snapshot_retention_period").(int))), 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 { if v, ok := d.GetOk("snapshot_cluster_identifier"); ok {