-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
New Resource: aws_ce_anomaly_subscription #25224
New Resource: aws_ce_anomaly_subscription #25224
Conversation
- Amend anomaly subscription resource to support tags - Amend anomaly subscription resource update subscribers correctly - Amend anomaly subscription tests to test each update field
- Added website docs - Amend resource, correct caps service names in functions - Amend tests, randomize emails - Amend test, add subscriber type SNS test case
- Amend docs to fit proper indentation of list items - Amend ARN check to ensure proper format
- Amend resource update function to include "tags_all" - Amend errors to produce correct output based on CRUD operation.
merge `main` to bring branch up to speed
- Add FindAnomalySubscriptionByARN finder - Update tests to use new finder - Update read to use new finder
- Amend tests: fix terraform lint
Rebase from main after merge of #25177 and added improvements. Output of current acceptance tests:
|
- Check content of subscriber block in basic test - Check import at each step of Subscriber attribute test
- Checking the exact values of a nested Set or List value is not recommended or necessary: - Faulty errors can result from changed indices - Testing framework will already return failure if there is a mismatch with specified config during ImportStateVerify - If check *is* necessary: should use TestCheckTypeSetElemNestedAttrs (https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/resource#TestCheckTypeSetElemNestedAttrs)
Hi @brittandeyoung! I've made a handful of minor edits -- mostly around acceptance testing robustness. Acceptance tests appear to cover all desired functionality and are fully passing: ❯ make testacc TESTS=TestAccCEAnomalySubscription PKG=ce
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ce/... -v -count 1 -parallel 20 -run='TestAccCEAnomalySubscription' -timeout 180m
=== RUN TestAccCEAnomalySubscription_basic
=== PAUSE TestAccCEAnomalySubscription_basic
=== RUN TestAccCEAnomalySubscription_disappears
=== PAUSE TestAccCEAnomalySubscription_disappears
=== RUN TestAccCEAnomalySubscription_Frequency
=== PAUSE TestAccCEAnomalySubscription_Frequency
=== RUN TestAccCEAnomalySubscription_MonitorARNList
=== PAUSE TestAccCEAnomalySubscription_MonitorARNList
=== RUN TestAccCEAnomalySubscription_Subscriber
=== PAUSE TestAccCEAnomalySubscription_Subscriber
=== RUN TestAccCEAnomalySubscription_Threshold
=== PAUSE TestAccCEAnomalySubscription_Threshold
=== RUN TestAccCEAnomalySubscription_Tags
=== PAUSE TestAccCEAnomalySubscription_Tags
=== CONT TestAccCEAnomalySubscription_basic
=== CONT TestAccCEAnomalySubscription_Subscriber
=== CONT TestAccCEAnomalySubscription_Tags
=== CONT TestAccCEAnomalySubscription_Frequency
=== CONT TestAccCEAnomalySubscription_Threshold
=== CONT TestAccCEAnomalySubscription_MonitorARNList
=== CONT TestAccCEAnomalySubscription_disappears
--- PASS: TestAccCEAnomalySubscription_disappears (14.48s)
--- PASS: TestAccCEAnomalySubscription_basic (16.71s)
--- PASS: TestAccCEAnomalySubscription_Frequency (26.48s)
--- PASS: TestAccCEAnomalySubscription_MonitorARNList (26.62s)
--- PASS: TestAccCEAnomalySubscription_Threshold (26.69s)
--- PASS: TestAccCEAnomalySubscription_Tags (34.78s)
--- PASS: TestAccCEAnomalySubscription_Subscriber (49.46s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ce 49.522s Thanks so much for your work here @brittandeyoung; am looking forward to seeing further contributions! Merging to main 🚀 |
Made final small edit. Acceptance tests confirmed still passing ✔️ |
This functionality has been released in v4.20.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! |
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
Relates #16137
Output from acceptance testing: