Skip to content

Commit

Permalink
Merge pull request #7981 from kterada0509/feature/add-support-for-tag…
Browse files Browse the repository at this point in the history
…-on-create-aws_kinesis_firehose_delivery_stream

Add support for tag-on-create for aws_kinesis_firehose_delivery_stream resource
  • Loading branch information
bflad authored Jun 26, 2019
2 parents 092c802 + 9cd552b commit 4e30284
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions aws/resource_aws_kinesis_firehose_delivery_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,10 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta
}
}

if v, ok := d.GetOk("tags"); ok {
createInput.Tags = tagsFromMapKinesisFirehose(v.(map[string]interface{}))
}

err := resource.Retry(1*time.Minute, func() *resource.RetryError {
_, err := conn.CreateDeliveryStream(createInput)
if err != nil {
Expand Down Expand Up @@ -2130,12 +2134,6 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta
d.SetId(*s.DeliveryStreamARN)
d.Set("arn", s.DeliveryStreamARN)

if err := setTagsKinesisFirehose(conn, d, sn); err != nil {
return fmt.Errorf(
"Error setting for Kinesis Stream (%s) tags: %s",
sn, err)
}

return resourceAwsKinesisFirehoseDeliveryStreamRead(d, meta)
}

Expand Down

0 comments on commit 4e30284

Please sign in to comment.