-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
provider/aws: Add support for api_gateway_account #6321
provider/aws: Add support for api_gateway_account #6321
Conversation
I received response from AWS support confirming my findings - i.e. it's not possible to remove an ARN or make it blank. 😢
This is therefore ready for review/merge. |
|
||
log.Printf("[INFO] Reading API Gateway Account %s", d.Id()) | ||
account, err := conn.GetAccount(&apigateway.GetAccountInput{}) | ||
if err != nil { |
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.
Is there a chance that someone deleting an ApiGatewayAccount (using the AWS Console) could cause an error here? Should we check for a 404 and remove from state if so?
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.
There is no way to delete the "account" even through the AWS Console... so no.
Few small questions about the PR and 1 nit pick (about adding a test) but that can be fixed later if needed :) |
I guess we can merge this for now and then figure out the leaked resources part later? The tests pass (As below) so this LGTM!
|
Let me just add two tests (empty resource with "empty" update API call + Hopefully I'll get to it tomorrow. |
👍 |
44a34f8
to
dd844e7
Compare
dd844e7
to
0e7eabf
Compare
Both tests added per comments. This is now ready for final review @stack72 |
@radeksimko this is awesome :) Thanks! |
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I've reached out to Amazon to get a confirmation whether it's really impossible to reset CloudWatch Role ARN to empty string. That's why I marked this as WIP, otherwise it works ok (within the limitations of the API).see belowTest plan
make testacc TEST=./builtin/providers/aws TESTARGS='-run=AWSAPIGatewayAccount_basic'