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

route_settings unsupported in HTTP API Gateway #42

Closed askaribragimov closed 2 years ago

askaribragimov commented 2 years ago

Description

Current (1.1.0) version of the api-gateway module has this block:

  #  # bug - https://github.com/terraform-providers/terraform-provider-aws/issues/12893
  #  dynamic "route_settings" {
  #    for_each = var.create_routes_and_integrations ? var.integrations : {}
  #    content {
  #      route_key = route_settings.key
  #      data_trace_enabled = lookup(route_settings.value, "data_trace_enabled", null)
  #      detailed_metrics_enabled         = lookup(route_settings.value, "detailed_metrics_enabled", null)
  #      logging_level         = lookup(route_settings.value, "logging_level", null)  # Error: error updating API Gateway v2 stage ($default): BadRequestException: Execution logs are not supported on protocolType HTTP
  #      throttling_burst_limit         = lookup(route_settings.value, "throttling_burst_limit", null)
  #      throttling_rate_limit         = lookup(route_settings.value, "throttling_rate_limit", null)
  #    }
  #  }

TF documentation tells that stage's routes can have custom settings ( see "route_settings" in https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/apigatewayv2_stage)

As such, I can not do the following instruction, it has no effect:

module "api_gateway" {
  source  = "terraform-aws-modules/apigateway-v2/aws"
  version = "~> 1.1.0"
  protocol_type = "HTTP"
 # ...  options abriged...
  integrations = {
    "GET /auth/myinegration" = {
      #...abriged...
      # THESE INSTRUCTIONS ARE IN https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/apigatewayv2_stage but they are not supported by your module due to the commented bit quoted above.
      throttling_rate_limit=10
      throttling_burst_limit=10
    }

The issue https://github.com/terraform-providers/terraform-provider-aws/issues/12893 seem to be closed but it is hard to say if underlying issue is been fixed.

I am interested into setting throttling_burst_limit / throttling_rate_limit in particular.

akubala commented 2 years ago

I am also curious about the state of mentioned issue. It would be great to use data_trace_enabled option for default_route_settings resource. :)

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.

antonbabenko commented 3 weeks ago

This issue has been resolved in version 5.0.0 :tada: