-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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: API Gateway Custom Authorizer #8535
provider/aws: API Gateway Custom Authorizer #8535
Conversation
@@ -107,6 +112,7 @@ func resourceAwsApiGatewayMethodCreate(d *schema.ResourceData, meta interface{}) | |||
RequestModels: aws.StringMap(models), | |||
RequestParameters: aws.BoolMap(parameters), | |||
ApiKeyRequired: aws.Bool(d.Get("api_key_required").(bool)), | |||
AuthorizerId: aws.String(d.Get("authorizer_id").(string)), |
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.
If this is optional, shouldn't we check that it is present before passing it to the API?
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.
True, we could do that, although based on tests it has the same effect as passing an empty string. Admittedly I'm in favour of changes that make resulting HTTP requests smaller so I'll update the PR. 😉 👍
c29cec7
to
0a32edf
Compare
PR Updated + rebased. Also I reran the acceptance tests and they're all passing now. 🎉 |
|
@@ -39,7 +39,8 @@ The following arguments are supported: | |||
* `rest_api_id` - (Required) The ID of the associated REST API | |||
* `resource_id` - (Required) The API resource ID | |||
* `http_method` - (Required) The HTTP Method (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTION`) | |||
* `authorization` - (Required) The type of authorization used for the method | |||
* `authorization` - (Required) The type of authorization used for the method (`NONE`, `CUSTOM`) |
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.
AWS_IAM is also a valid authorisation type (authorizer_id not required for this)
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.
Thanks for the note @swestcott , would you mind sending a PR with this small fix?
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. |
Replaces #6731
Thanks @johnjelinek for most of the work here. I just added a few missing bits.
Test plan
One test may actually fail until #8533 is merged.