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 188 forks source link

Support response_templates #52

Closed Silvere112 closed 2 years ago

Silvere112 commented 2 years ago

Is your request related to a new offering from AWS?

No.

Is your request related to a problem? Please describe.

Yes. I would like to specifiy the response_templates for each endpoints. The resource aws_apigatewayv2_integration_response offer this possibility but is not yet supported in this module.

Describe the solution you'd like.

Adding the possibility to use response_templates in the integrations field like this :

 integrations = {
    "POST /" = {
      lambda_arn             = "arn:aws:lambda:eu-west-1:052235179155:function:my-function"
      payload_format_version = "2.0"
      timeout_milliseconds   = 12000
      response_templates = {
         "application/json" = "{\"message\":$context.error.messageString}"
      }
  }

Describe alternatives you've considered.

Adding the resource outside the module

Additional context

N/A

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 2 years ago

This issue was automatically closed because of stale in 10 days

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.