Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tag-on-create for aws_kinesis_firehose_delivery_stream resource #7981

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2127,12 +2131,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