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

r/aws_ram_resource_share_accepter: handle out-of-band resource deletion #35800

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Feb 13, 2024

Description

Previously, resource shares left out-of-band would result in the terraform destroy operation failing with an UnknownResourceException indicating the share could not be found. Nowthis error will be appropriately ignored allowing destroy to exit cleanly.

Before:

% AWS_ALTERNATE_PROFILE=foo make testacc TESTS=TestAccRAMResourceShareAccepter_disappears PKG=ram
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 20 -run='TestAccRAMResourceShareAccepter_disappears'  -timeout 360m
=== RUN   TestAccRAMResourceShareAccepter_disappears
=== PAUSE TestAccRAMResourceShareAccepter_disappears
=== CONT  TestAccRAMResourceShareAccepter_disappears
    testing_new.go:91: Error running post-test destroy, there may be dangling resources: exit status 1

        Error: leaving RAM resource share: UnknownResourceException: ResourceShare arn:aws:ram:us-west-2:927163995318:resource-share/1db3b09a-9c52-49e2-be80-97bc94fbe03a could not be found.

--- FAIL: TestAccRAMResourceShareAccepter_disappears (141.26s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/ram        148.194s

Output from Acceptance Testing

% AWS_ALTERNATE_PROFILE=foo make testacc TESTS=TestAccRAMResourceShareAccepter_disappears PKG=ram
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 20 -run='TestAccRAMResourceShareAccepter_disappears'  -timeout 360m
=== RUN   TestAccRAMResourceShareAccepter_disappears
=== PAUSE TestAccRAMResourceShareAccepter_disappears
=== CONT  TestAccRAMResourceShareAccepter_disappears
--- PASS: TestAccRAMResourceShareAccepter_disappears (149.78s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ram        158.022s

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 size/XS Managed by automation to categorize the size of a PR. service/ram Issues and PRs that pertain to the ram service. labels Feb 13, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Feb 13, 2024
Previously, resource shares left out-of-band would result in the terraform destroy operation failing with an UnknownResourceException indicating the share could not be found. Nowthis error will be appropriately ignored allowing destroy to exit cleanly.
@jar-b jar-b force-pushed the b-ram_resource_share_accepter-disappears branch from 782903c to 7c84515 Compare February 13, 2024 21:44
@jar-b jar-b merged commit 5367030 into main Feb 14, 2024
34 checks passed
@jar-b jar-b deleted the b-ram_resource_share_accepter-disappears branch February 14, 2024 15:19
@github-actions github-actions bot added this to the v5.37.0 milestone Feb 14, 2024
github-actions bot pushed a commit that referenced this pull request Feb 14, 2024
Copy link

This functionality has been released in v5.37.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 15, 2024
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ram Issues and PRs that pertain to the ram service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant