-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
fix: Wait until RAM resource share available after accepting the invitation #34753
fix: Wait until RAM resource share available after accepting the invitation #34753
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @kota65535 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
@kota65535 @justinretzolk is there a plan to merge the fix please?We are waiting for that fix as we are not able to progress the update on the aws providers |
I can verify that this fixes the bug in #33701. Sample output from v5.35.0 (latest at the time of writing):
Sample output from patched v5.35.0:
|
Hoping the maintainers give this issue some love! This is a very simple PR and fixes a critical bug in the current provider release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved for merge. LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
% make testacc TESTS=TestAccRAMResourceShareAccepter PKG=ram
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ram/... -v -count 1 -parallel 20 -run='TestAccRAMResourceShareAccepter' -timeout 360m
=== RUN TestAccRAMResourceShareAccepter_basic
=== PAUSE TestAccRAMResourceShareAccepter_basic
=== RUN TestAccRAMResourceShareAccepter_disappears
=== PAUSE TestAccRAMResourceShareAccepter_disappears
=== RUN TestAccRAMResourceShareAccepter_resourceAssociation
=== PAUSE TestAccRAMResourceShareAccepter_resourceAssociation
=== CONT TestAccRAMResourceShareAccepter_basic
=== CONT TestAccRAMResourceShareAccepter_resourceAssociation
=== CONT TestAccRAMResourceShareAccepter_disappears
--- PASS: TestAccRAMResourceShareAccepter_basic (28.61s)
=== NAME TestAccRAMResourceShareAccepter_resourceAssociation
resource_share_accepter_test.go:105: Step 2/2 error running import: ImportStateVerify attributes not equivalent. Difference is shown below. The - symbol indicates attributes missing after import.
map[string]string{
+ "resources.#": "1",
+ "resources.0": "arn:aws:codebuild:us-west-2:927163995318:project/tf-acc-test-2871805097709289946",
}
--- FAIL: TestAccRAMResourceShareAccepter_resourceAssociation (39.35s)
=== NAME 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/2d9dbe34-bba4-49e2-9a01-5aad391d414a could not be found.
--- FAIL: TestAccRAMResourceShareAccepter_disappears (142.49s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ram 148.820s
Thanks for your contribution, @kota65535! 👏 |
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! |
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. |
Description
When a RAM resource share invitation from another account is accepted, there will be a slight delay until the resource share can be found. This PR adds wait for the delay.
Relations
Closes #33701
Output from Acceptance Testing
With AWS_PROFILE env variable:
As the warning says, I've also tried setting AWS_ALTERNATE_PROFILE env variable on the latest main branch, but it seems very flaky. Note that the error message of the first failed test is the same as the original issue.
After adding my change, the first failed test case become to PASS.