terraform-provider-aws icon indicating copy to clipboard operation
terraform-provider-aws copied to clipboard

add support for aws shield subscription resource fixes hashicorp#21430

Open iwarapter opened this issue 1 year ago • 1 comments

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.

iwarapter avatar May 22 '24 15:05 iwarapter

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[bot] avatar May 22 '24 15:05 github-actions[bot]

@iwarapter are you still working on this great improvement ?

barryib avatar Jun 24 '24 14:06 barryib

Oh I didn't notice the linter failed, will take a look

iwarapter avatar Jun 24 '24 14:06 iwarapter

Thanks for your contribution, @iwarapter! 👍

jar-b avatar Jul 24 '24 17:07 jar-b

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!

github-actions[bot] avatar Jul 25 '24 21:07 github-actions[bot]

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.

github-actions[bot] avatar Aug 26 '24 02:08 github-actions[bot]