-
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
Add support for Api Gateway method request validators. #1064
Add support for Api Gateway method request validators. #1064
Conversation
return nil | ||
} | ||
|
||
if !ok { |
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.
I adapted the delete function from aws_api_gateway_method. But, it seems to me that this if
statement is not necessary (neither in this file nor in the other one).
In addition to that, I have realized that deleting a request validator might be more similar to deleting an authorizer (as seen here). That method contains the following comment:
// XXX: Figure out a way to delete the method that depends on the authorizer first
// otherwise the authorizer will be dangling until the API is deleted
The same thing happens for a request validator. If it is deleted before the method that uses it, AWS returns an error. Has any solution been found to that issue?
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, thanks!
if s := v.(string); len(s) > 0 { | ||
request_validator_id = &s | ||
} | ||
} |
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.
I think we need to compare the old value here with the new one. If the old one is an ID, and the new one is ""
, then we're deleting a request valuator, and we should issue a remove
update here on the method
, correct? It doesn't look like we can otherwise remove anything as-is
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.
I checked this out and tried manually, it seems we're sending nil
in the operations below which is effectively doing what we want and removing it, so I guess this is fine 👍
The missing documentation has been submitted: #5110 |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This PR should fix terraform-providers#772