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

Add support for Api Gateway method request validators. #1064

Merged

Conversation

betabandido
Copy link
Contributor

This PR should fix terraform-providers#772

return nil
}

if !ok {
Copy link
Contributor Author

@betabandido betabandido Jul 5, 2017

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?

Copy link
Contributor

@catsby catsby left a 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
}
}
Copy link
Contributor

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

Copy link
Contributor

@catsby catsby Jul 7, 2017

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 👍

@bflad
Copy link
Contributor

bflad commented Jul 6, 2018

The missing documentation has been submitted: #5110

@betabandido betabandido deleted the feature/add-method-request-validator branch August 18, 2018 09:36
@ghost
Copy link

ghost commented Apr 4, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for AWS method request validation
3 participants