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

f/ New Resource Cloudwatch Contributor Insight Rule #41373

Merged
merged 18 commits into from
Feb 13, 2025

Conversation

nam054
Copy link
Contributor

@nam054 nam054 commented Feb 12, 2025

Description

Add new resource CloudWatch Contributor Insight Rule

Relations

Relates #17877

References

Output from Acceptance Testing

> make testacc PKG=cloudwatch TESTS=TestAccCloudWatchContributorInsightRule_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/cloudwatch/... -v -count 1 -parallel 20 -run='TestAccCloudWatchContributorInsightRule_'  -timeout 360m -vet=off
2025/02/12 13:31:13 Initializing Terraform AWS Provider...
=== RUN   TestAccCloudWatchContributorInsightRule_tags
=== PAUSE TestAccCloudWatchContributorInsightRule_tags
=== RUN   TestAccCloudWatchContributorInsightRule_tags_null
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_null
=== RUN   TestAccCloudWatchContributorInsightRule_tags_EmptyMap
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_EmptyMap
=== RUN   TestAccCloudWatchContributorInsightRule_tags_AddOnUpdate
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_AddOnUpdate
=== RUN   TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnCreate
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnCreate
=== RUN   TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Add
=== RUN   TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Replace
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_providerOnly
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_providerOnly
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nonOverlapping
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_overlapping
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_overlapping
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToProviderOnly
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToResourceOnly
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyResourceTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyProviderOnlyTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyProviderOnlyTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnCreate
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnCreate
=== RUN   TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Add
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Add
=== RUN   TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Replace
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Replace
=== RUN   TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_DefaultTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_DefaultTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_ResourceTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_ResourceTag
=== RUN   TestAccCloudWatchContributorInsightRule_basic
=== PAUSE TestAccCloudWatchContributorInsightRule_basic
=== RUN   TestAccCloudWatchContributorInsightRule_disappears
=== PAUSE TestAccCloudWatchContributorInsightRule_disappears
=== CONT  TestAccCloudWatchContributorInsightRule_tags
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyResourceTag
=== CONT  TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Replace
=== CONT  TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnCreate
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nonOverlapping
=== CONT  TestAccCloudWatchContributorInsightRule_basic
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToProviderOnly
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullNonOverlappingResourceTag
=== CONT  TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Add
=== CONT  TestAccCloudWatchContributorInsightRule_disappears
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullOverlappingResourceTag
=== CONT  TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Add
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_overlapping
=== CONT  TestAccCloudWatchContributorInsightRule_tags_EmptyMap
=== CONT  TestAccCloudWatchContributorInsightRule_tags_null
=== CONT  TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_ResourceTag
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyProviderOnlyTag
=== CONT  TestAccCloudWatchContributorInsightRule_tags_AddOnUpdate
=== CONT  TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnCreate
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToResourceOnly
--- PASS: TestAccCloudWatchContributorInsightRule_disappears (34.17s)
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_providerOnly
--- PASS: TestAccCloudWatchContributorInsightRule_basic (40.61s)
=== CONT  TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_DefaultTag
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullNonOverlappingResourceTag (48.89s)
=== CONT  TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Replace
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullOverlappingResourceTag (49.23s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyProviderOnlyTag (49.28s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnCreate (49.46s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_EmptyMap (49.46s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_null (49.92s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyResourceTag (50.17s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToResourceOnly (68.55s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToProviderOnly (72.61s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_AddOnUpdate (72.65s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Add (73.06s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Replace (73.76s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnCreate (75.71s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_ResourceTag (88.33s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Add (93.43s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Replace (45.36s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nonOverlapping (95.07s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_overlapping (96.59s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_DefaultTag (57.60s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags (107.35s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_providerOnly (82.89s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch 123.952s

...

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/cloudwatch Issues and PRs that pertain to the cloudwatch service. generators Relates to code generators. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Feb 12, 2025
@nam054 nam054 marked this pull request as ready for review February 12, 2025 21:59
@nam054 nam054 requested a review from a team as a code owner February 12, 2025 21:59
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

% make testacc PKG=cloudwatch TESTS=TestAccCloudWatchContributorInsightRule_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/cloudwatch/... -v -count 1 -parallel 20 -run='TestAccCloudWatchContributorInsightRule_'  -timeout 360m -vet=off
2025/02/13 11:17:57 Initializing Terraform AWS Provider...
=== RUN   TestAccCloudWatchContributorInsightRule_tags
=== PAUSE TestAccCloudWatchContributorInsightRule_tags
=== RUN   TestAccCloudWatchContributorInsightRule_tags_null
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_null
=== RUN   TestAccCloudWatchContributorInsightRule_tags_EmptyMap
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_EmptyMap
=== RUN   TestAccCloudWatchContributorInsightRule_tags_AddOnUpdate
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_AddOnUpdate
=== RUN   TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnCreate
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnCreate
=== RUN   TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Add
=== RUN   TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Replace
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_providerOnly
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_providerOnly
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nonOverlapping
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_overlapping
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_overlapping
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToProviderOnly
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToResourceOnly
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyResourceTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyProviderOnlyTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyProviderOnlyTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnCreate
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnCreate
=== RUN   TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Add
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Add
=== RUN   TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Replace
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Replace
=== RUN   TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_DefaultTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_DefaultTag
=== RUN   TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_ResourceTag
=== PAUSE TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_ResourceTag
=== RUN   TestAccCloudWatchContributorInsightRule_basic
=== PAUSE TestAccCloudWatchContributorInsightRule_basic
=== RUN   TestAccCloudWatchContributorInsightRule_disappears
=== PAUSE TestAccCloudWatchContributorInsightRule_disappears
=== CONT  TestAccCloudWatchContributorInsightRule_tags
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyResourceTag
=== CONT  TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Replace
=== CONT  TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Replace
=== CONT  TestAccCloudWatchContributorInsightRule_tags_AddOnUpdate
=== CONT  TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Add
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_overlapping
=== CONT  TestAccCloudWatchContributorInsightRule_tags_null
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyProviderOnlyTag
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nonOverlapping
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToResourceOnly
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_providerOnly
=== CONT  TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnCreate
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToProviderOnly
=== CONT  TestAccCloudWatchContributorInsightRule_basic
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullNonOverlappingResourceTag
=== CONT  TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Add
=== CONT  TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnCreate
=== CONT  TestAccCloudWatchContributorInsightRule_tags_EmptyMap
=== CONT  TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullOverlappingResourceTag
--- PASS: TestAccCloudWatchContributorInsightRule_basic (27.36s)
=== CONT  TestAccCloudWatchContributorInsightRule_disappears
--- PASS: TestAccCloudWatchContributorInsightRule_tags_EmptyMap (28.36s)
=== CONT  TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_ResourceTag
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyProviderOnlyTag (32.68s)
=== CONT  TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_DefaultTag
--- PASS: TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnCreate (32.81s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullNonOverlappingResourceTag (32.85s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_emptyResourceTag (32.90s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nullOverlappingResourceTag (32.92s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_null (32.97s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToResourceOnly (42.88s)
--- PASS: TestAccCloudWatchContributorInsightRule_disappears (16.38s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Replace (44.05s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_AddOnUpdate (44.69s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_updateToProviderOnly (44.95s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Add (47.03s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_ComputedTag_OnUpdate_Replace (47.13s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnCreate (48.17s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_EmptyTag_OnUpdate_Add (56.60s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_nonOverlapping (61.62s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_overlapping (62.15s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_DefaultTag (33.40s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_IgnoreTags_Overlap_ResourceTag (38.51s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags (72.06s)
--- PASS: TestAccCloudWatchContributorInsightRule_tags_DefaultTags_providerOnly (73.59s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/cloudwatch	77.951s

Comment on lines +29 to +34
// @FrameworkResource("aws_cloudwatch_contributor_insight_rule", name="Contributor Insight Rule")
// @Tags(identifierAttribute="resource_arn")
// @Testing(importStateIdFunc="testAccContributorInsightRuleImportStateIDFunc")
// @Testing(importStateIdAttribute="rule_name")
// @Testing(importIgnore="rule_definition;rule_state")
// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/cloudwatch/types;types.InsightRule")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy moly

@nam054 nam054 merged commit 371138b into main Feb 13, 2025
48 checks passed
@nam054 nam054 deleted the f-cloudwatch_contributor_insights branch February 13, 2025 17:38
@github-actions github-actions bot added this to the v5.87.0 milestone Feb 13, 2025
terraform-aws-provider bot pushed a commit that referenced this pull request Feb 13, 2025
Copy link

This functionality has been released in v5.87.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. Thank you!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. generators Relates to code generators. service/cloudwatch Issues and PRs that pertain to the cloudwatch service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants