terraform-provider-aws
terraform-provider-aws copied to clipboard
add support for aws shield subscription resource fixes hashicorp#21430
Description
Add resource for Shield Subscription:
Relations
Closes #21430
Output from Acceptance Testing
% make testacc TESTS=TestAccShieldSubscription_basic PKG=shield
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/shield/... -v -count 1 -parallel 20 -run='TestAccShieldSubscription_basic' -timeout 360m
=== RUN TestAccShieldSubscription_basic
=== PAUSE TestAccShieldSubscription_basic
=== CONT TestAccShieldSubscription_basic
subscription_test.go:34: Error running post-test destroy, there may be dangling resources: exit status 1
Error: deleting AWS Shield Subscription ("hidden"): operation error Shield: DeleteSubscription, https response error StatusCode: 400, RequestID: 13177d54-c466-46f8-9446-346d6abeeb7c, LockedSubscriptionException: The subscription could not be deactivated before time commitment expires.
operation error Shield: DeleteSubscription, https response error StatusCode:
400, RequestID: 13177d54-c466-46f8-9446-346d6abeeb7c,
LockedSubscriptionException: The subscription could not be deactivated before
time commitment expires.
--- FAIL: TestAccShieldSubscription_basic (14.72s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/shield 18.885s
FAIL
make: *** [testacc] Error 1
...
I ran out of accounts to subscribe in my organisation to finish the tests but added the destroy = false to both create/import steps.
All the accounts I tested with are correctly subscribed.
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.
@iwarapter are you still working on this great improvement ?
Oh I didn't notice the linter failed, will take a look
Thanks for your contribution, @iwarapter! 👍
This functionality has been released in v5.60.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. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.