terraform-aws-modules / terraform-aws-apigateway-v2

Terraform module to create AWS API Gateway v2 (HTTP/WebSocket) 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/apigateway-v2/aws
Apache License 2.0
144 stars 187 forks source link

Passing authorization_scopes to integration configuration #66

Closed jschilperoord closed 2 years ago

jschilperoord commented 2 years ago

Description

I noticed that on line 136 inside main.tf of the v1.6.0 version of the module is commented out:

authorization_scopes = try(each.value.authorization_scopes, null)

I executed some tests by running a copy of the module locally and it looks like this line can safely be uncommented to pass the scopes to the route. Or are there other reservations to have this line commented out for now? Maybe I am missing something. Because I would love to use this module with this feature enabled :-)

If your request is for a new feature, please use the Feature request template.

⚠️ Note

Before you submit an issue, please perform the following first:

  1. Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
  2. Re-initialize the project root to pull down modules: terraform init
  3. Re-attempt your terraform plan or apply and check if the issue still persists

Versions

Terraform v1.1.7 on darwin_amd64 provider registry.terraform.io/hashicorp/aws v4.3.0

Reproduction Code [Required]

Steps to reproduce the behavior:

Pass the authorization_scopes in the integration configuration with a JWT authorizer.

Expected behavior

The authorization_scopes should be visible on the route in the APIGW.

Actual behavior

The parameter is ignored and the scopes are not visible on the APIGW route

antonbabenko commented 2 years ago

I see the comment above the line saying - Not sure what structure is allowed for these arguments..., and I found this comment.

I also see the official documentation for this resource has been updated, so a pull request where this argument and maybe others supported by this resource is welcome. Please make sure to update the code in the example folder to show this feature in action.

github-actions[bot] commented 1 year ago

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.