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

[#9209] Fix dx gateway association proposal so it works even if expired #12221

Closed
wants to merge 1 commit into from

Conversation

blckct
Copy link
Contributor

@blckct blckct commented Mar 2, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Currently the proposal expires after some time which causes TF to want to recreate it and recreate everything that depends on it so it's pretty useless. This change makes the resource ignore that API doesn't return anything and keep returning the last known state. It seems to work with the expired proposals I have access to however it would be great if someone could help with testing or give some insight into what may be problems with heavy handed approach like this one.
Closes #9209

Release note for CHANGELOG:

resource/aws_dx_gateway_association_proposal: Return last known state for dx_gateway_associaton_proposal if expired

Output from acceptance testing:

I haven't been able to run the tests, as I'm waiting for my second account. Would be nice if someone else could run them.

@blckct blckct requested a review from a team March 2, 2020 01:31
@ghost ghost added needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/directconnect Issues and PRs that pertain to the directconnect service. labels Mar 2, 2020
@blckct blckct force-pushed the fix_dx_association_proposal branch from fb656e1 to c13b25c Compare March 3, 2020 14:23
@ewbankkit
Copy link
Contributor

@blckct Thanks for this.
Have you written acceptance test(s)? If so could you please add them to the PR and I can take a look; otherwise if you need help, let me know.

@blckct
Copy link
Contributor Author

blckct commented Mar 3, 2020

@ewbankkit Hey, I didn't run existing tests as I had a bit of a trouble setting up an alternative account that's needed for it. Do you mind running those for me?
As for the acceptance tests...Well, it's a bit of a problem since from what I know it expires after a few days. I'll have to check if it can be deleted.

@Omarimcblack
Copy link
Contributor

@blckct currently this has been working great for me, the only caveat being when you then need to delete an expired(accepted) proposal terraform bombs out. I came up with a fix that works for me blckct#1

@blckct
Copy link
Contributor Author

blckct commented Sep 29, 2020

@Omarimcblack this has been picked up by @ewbankkit in #12482 so I'm not sure this code will be used. Have you checked if his code is working for you?

@Omarimcblack
Copy link
Contributor

@Omarimcblack this has been picked up by @ewbankkit in #12482 so I'm not sure this code will be used. Have you checked if his code is working for you?

@blckct unfortunately for my use-case handling from the aws_dx_gateway_association only is not enough. Where we are using cross account association we must use both resources aws_dx_gateway_association & aws_dx_gateway_association_proposal therefore both persist in our state and we cannot have the aws_dx_gateway_association_proposal wishing to be recreated every time it has been accepted and terraform runs again(regardless of whether the proposal_id is ignored by the aws_dx_gateway_association or not).

understandable handling the resource this way, if you ever manually delete a proposal or its expired for a reason other than you accepting, you will need to run a state rm. i'm very much open to hearing any other ways of handling this but for now i believe this PR to still be relevant

Base automatically changed from master to main January 23, 2021 00:57
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:57
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Mar 2, 2021
@ewbankkit
Copy link
Contributor

@blckct Thanks for the contribution 🎉 👏.
The solution (🤞) to this problem is being addressed in #19741.

@ewbankkit ewbankkit closed this Jun 23, 2021
@github-actions
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 Jul 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/directconnect Issues and PRs that pertain to the directconnect 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.

aws_dx_gateway_association_proposal recreated
3 participants