Skip to content

[api_gateway] Unable to specify multi-level routes #26

@szilveszter

Description

@szilveszter

The current implementation of the api_gateway module won't allow using /s in the routes:

routes = {
  "/multi-level/path" = {
    lambda_key = "rest_api_handler"
  }
}

This results in the following error during terraform apply:

│ Error: creating API Gateway Resource: BadRequestException: Resource's path part only allow a-zA-Z0-9._-: or a valid greedy path variable and curly braces at the beginning and the end.
│ 
│   with module.main.module.rest_api_gateway.aws_api_gateway_resource.rest_api_route_resource["multi-level/path"],
│   on .terraform/modules/main.rest_api_gateway/modules/api_gateway/main.tf line 146, in resource "aws_api_gateway_resource" "rest_api_route_resource":
│  146: resource "aws_api_gateway_resource" "rest_api_route_resource" {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions