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/log anomaly detector resource #40437

Merged
merged 31 commits into from
Dec 9, 2024
Merged

F/log anomaly detector resource #40437

merged 31 commits into from
Dec 9, 2024

Conversation

nam054
Copy link
Contributor

@nam054 nam054 commented Dec 4, 2024

Description

New Resource Cloudwatch Logs Anomaly Detector

Relations

Closes #34788

References

Output from Acceptance Testing

> make testacc PKG=logs TESTS=TestAccLogsAnomalyDetector_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/logs/... -v -count 1 -parallel 20 -run='TestAccLogsAnomalyDetector_'  -timeout 360m
2024/12/06 13:20:40 Initializing Terraform AWS Provider...
=== RUN   TestAccLogsAnomalyDetector_tags
=== PAUSE TestAccLogsAnomalyDetector_tags
=== RUN   TestAccLogsAnomalyDetector_tags_null
=== PAUSE TestAccLogsAnomalyDetector_tags_null
=== RUN   TestAccLogsAnomalyDetector_tags_EmptyMap
=== PAUSE TestAccLogsAnomalyDetector_tags_EmptyMap
=== RUN   TestAccLogsAnomalyDetector_tags_AddOnUpdate
=== PAUSE TestAccLogsAnomalyDetector_tags_AddOnUpdate
=== RUN   TestAccLogsAnomalyDetector_tags_EmptyTag_OnCreate
=== PAUSE TestAccLogsAnomalyDetector_tags_EmptyTag_OnCreate
=== RUN   TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Add
=== RUN   TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Replace
=== RUN   TestAccLogsAnomalyDetector_tags_DefaultTags_providerOnly
=== PAUSE TestAccLogsAnomalyDetector_tags_DefaultTags_providerOnly
=== RUN   TestAccLogsAnomalyDetector_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccLogsAnomalyDetector_tags_DefaultTags_nonOverlapping
=== RUN   TestAccLogsAnomalyDetector_tags_DefaultTags_overlapping
=== PAUSE TestAccLogsAnomalyDetector_tags_DefaultTags_overlapping
=== RUN   TestAccLogsAnomalyDetector_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccLogsAnomalyDetector_tags_DefaultTags_updateToProviderOnly
=== RUN   TestAccLogsAnomalyDetector_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccLogsAnomalyDetector_tags_DefaultTags_updateToResourceOnly
=== RUN   TestAccLogsAnomalyDetector_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccLogsAnomalyDetector_tags_DefaultTags_emptyResourceTag
=== RUN   TestAccLogsAnomalyDetector_tags_DefaultTags_emptyProviderOnlyTag
=== PAUSE TestAccLogsAnomalyDetector_tags_DefaultTags_emptyProviderOnlyTag
=== RUN   TestAccLogsAnomalyDetector_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccLogsAnomalyDetector_tags_DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccLogsAnomalyDetector_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccLogsAnomalyDetector_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccLogsAnomalyDetector_tags_ComputedTag_OnCreate
=== PAUSE TestAccLogsAnomalyDetector_tags_ComputedTag_OnCreate
=== RUN   TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Add
=== PAUSE TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Add
=== RUN   TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Replace
=== PAUSE TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Replace
=== RUN   TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_DefaultTag
=== PAUSE TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_DefaultTag
=== RUN   TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_ResourceTag
=== PAUSE TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_ResourceTag
=== RUN   TestAccLogsAnomalyDetector_basic
=== PAUSE TestAccLogsAnomalyDetector_basic
=== RUN   TestAccLogsAnomalyDetector_update
=== PAUSE TestAccLogsAnomalyDetector_update
=== RUN   TestAccLogsAnomalyDetector_disappears
=== PAUSE TestAccLogsAnomalyDetector_disappears
=== CONT  TestAccLogsAnomalyDetector_tags
=== CONT  TestAccLogsAnomalyDetector_tags_DefaultTags_emptyResourceTag
=== CONT  TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Replace
=== CONT  TestAccLogsAnomalyDetector_tags_DefaultTags_overlapping
=== CONT  TestAccLogsAnomalyDetector_tags_DefaultTags_nonOverlapping
=== CONT  TestAccLogsAnomalyDetector_tags_DefaultTags_updateToResourceOnly
=== CONT  TestAccLogsAnomalyDetector_disappears
=== CONT  TestAccLogsAnomalyDetector_update
=== CONT  TestAccLogsAnomalyDetector_basic
=== CONT  TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_ResourceTag
=== CONT  TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_DefaultTag
=== CONT  TestAccLogsAnomalyDetector_tags_DefaultTags_providerOnly
=== CONT  TestAccLogsAnomalyDetector_tags_DefaultTags_updateToProviderOnly
=== CONT  TestAccLogsAnomalyDetector_tags_DefaultTags_nullNonOverlappingResourceTag
=== CONT  TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Add
=== CONT  TestAccLogsAnomalyDetector_tags_ComputedTag_OnCreate
=== CONT  TestAccLogsAnomalyDetector_tags_AddOnUpdate
=== CONT  TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Add
=== CONT  TestAccLogsAnomalyDetector_tags_EmptyTag_OnCreate
=== CONT  TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Replace
--- PASS: TestAccLogsAnomalyDetector_disappears (33.70s)
=== CONT  TestAccLogsAnomalyDetector_tags_DefaultTags_nullOverlappingResourceTag
--- PASS: TestAccLogsAnomalyDetector_basic (36.11s)
=== CONT  TestAccLogsAnomalyDetector_tags_DefaultTags_emptyProviderOnlyTag
=== CONT  TestAccLogsAnomalyDetector_tags_EmptyMap
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_nullNonOverlappingResourceTag (41.78s)
--- PASS: TestAccLogsAnomalyDetector_tags_ComputedTag_OnCreate (42.81s)
=== CONT  TestAccLogsAnomalyDetector_tags_null
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_emptyResourceTag (54.94s)
--- PASS: TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Replace (75.36s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_updateToResourceOnly (75.63s)
--- PASS: TestAccLogsAnomalyDetector_tags_AddOnUpdate (77.69s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_emptyProviderOnlyTag (41.91s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_nullOverlappingResourceTag (44.49s)
--- PASS: TestAccLogsAnomalyDetector_update (80.88s)
--- PASS: TestAccLogsAnomalyDetector_tags_null (41.16s)
--- PASS: TestAccLogsAnomalyDetector_tags_EmptyMap (42.27s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_updateToProviderOnly (84.15s)
--- PASS: TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Replace (84.57s)
--- PASS: TestAccLogsAnomalyDetector_tags_EmptyTag_OnCreate (85.74s)
--- PASS: TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Add (88.09s)
--- PASS: TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_DefaultTag (88.36s)
--- PASS: TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Add (93.10s)
--- PASS: TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_ResourceTag (96.73s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_nonOverlapping (98.91s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_overlapping (100.99s)
--- PASS: TestAccLogsAnomalyDetector_tags (109.73s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_providerOnly (114.85s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/logs       121.397s
...

Copy link

github-actions bot commented Dec 4, 2024

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. generators Relates to code generators. service/logs Issues and PRs that pertain to the logs service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Dec 4, 2024
@nam054 nam054 marked this pull request as ready for review December 4, 2024 13:08
@nam054 nam054 requested a review from a team as a code owner December 4, 2024 13:08
@johnsonaj
Copy link
Contributor

@nam054 one more nit here. We should add a test for updating

Copy link
Contributor

@johnsonaj johnsonaj 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 TESTARGS='-run=TestAccLogsAnomalyDetector_' PKG=logs

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/logs/... -v -count 1 -parallel 20  -run=TestAccLogsAnomalyDetector_ -timeout 360m
2024/12/06 19:16:15 Initializing Terraform AWS Provider...
--- PASS: TestAccLogsAnomalyDetector_disappears (36.58s)
--- PASS: TestAccLogsAnomalyDetector_basic (41.14s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_emptyResourceTag (48.95s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_nullNonOverlappingResourceTag (49.29s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_nullOverlappingResourceTag (49.42s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_emptyProviderOnlyTag (49.48s)
--- PASS: TestAccLogsAnomalyDetector_tags_ComputedTag_OnCreate (50.32s)
--- PASS: TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Replace (78.59s)
--- PASS: TestAccLogsAnomalyDetector_tags_EmptyMap (42.02s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_updateToResourceOnly (81.38s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_updateToProviderOnly (81.78s)
--- PASS: TestAccLogsAnomalyDetector_tags_EmptyTag_OnCreate (82.12s)
--- PASS: TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Replace (83.57s)
--- PASS: TestAccLogsAnomalyDetector_tags_AddOnUpdate (84.67s)
--- PASS: TestAccLogsAnomalyDetector_tags_ComputedTag_OnUpdate_Add (86.04s)
--- PASS: TestAccLogsAnomalyDetector_tags_null (38.24s)
--- PASS: TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_ResourceTag (94.98s)
--- PASS: TestAccLogsAnomalyDetector_update (51.03s)
--- PASS: TestAccLogsAnomalyDetector_tags_EmptyTag_OnUpdate_Add (100.95s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_overlapping (102.20s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_nonOverlapping (104.14s)
--- PASS: TestAccLogsAnomalyDetector_tags_IgnoreTags_Overlap_DefaultTag (64.12s)
--- PASS: TestAccLogsAnomalyDetector_tags (115.78s)
--- PASS: TestAccLogsAnomalyDetector_tags_DefaultTags_providerOnly (119.13s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/logs	125.659s

@nam054 nam054 merged commit cccaa57 into main Dec 9, 2024
44 checks passed
@nam054 nam054 deleted the f/log-anomaly-detector-resource branch December 9, 2024 17:23
@github-actions github-actions bot added this to the v5.81.0 milestone Dec 9, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Dec 9, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 12, 2024
Copy link

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

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/logs Issues and PRs that pertain to the logs 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.

[New Resource]: Log Anomaly Detector
2 participants