-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_cloudwatch_metric_stream: New resource #19429
Conversation
var name string | ||
if v, ok := d.GetOk("name"); ok { | ||
name = v.(string) | ||
} else if v, ok := d.GetOk("name_prefix"); ok { | ||
name = resource.PrefixedUniqueId(v.(string)) | ||
} else { | ||
name = resource.UniqueId() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should follow the recommended Resource Name Generation Support pattern.
log.Printf("[DEBUG] Putting CloudWatch MetricStream: %#v", params) | ||
_, err := conn.PutMetricStreamWithContext(ctx, ¶ms) | ||
if err != nil { | ||
return diag.FromErr(fmt.Errorf("Putting metric_stream failed: %s", err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return diag.FromErr(fmt.Errorf("Putting metric_stream failed: %s", err)) | |
return diag.FromErr(fmt.Errorf("putting metric_stream failed: %w", err)) |
} | ||
|
||
if err != nil { | ||
return diag.FromErr(fmt.Errorf("Reading metric_stream failed: %s", err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return diag.FromErr(fmt.Errorf("Reading metric_stream failed: %s", err)) | |
return diag.FromErr(fmt.Errorf("reading metric_stream failed: %w", err)) |
Tags are a little strange for CloudWatch Metric Stream.
So, tags can go in, but then you can never, have-I-ever see them again. 🤔 |
https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatch/#CloudWatch.ListTagsForResource This should give you back tags for metric streams (an integration test should demonstrate that). I suspect the API documentation for both TagResource and ListResourceTags need to be updated. |
Great work team - keen to see this land. 👍 |
But, running into an issue with GovCloud. It doesn't fail, just times out. |
This has been released in version 3.42.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
…am resource See: hashicorp/terraform-provider-aws#19429 (which superseded hashicorp/terraform-provider-aws#18870). Which means we can remove all the clunky run-your-own-forked-provider junk. Yay!
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #18870 (supercedes)
Closes #18525
Output from acceptance testing (
us-west-2
):Output from acceptance testing (GovCloud):