| name |
Name for the API |
string |
n/a |
yes |
| cors_configuration |
CORS configuration for HTTP APIs |
object({ allow_origins = optional(list(string), ["*"]) allow_methods = optional(list(string), ["GET", "POST", "PUT", "DELETE", "OPTIONS"]) allow_headers = optional(list(string), ["Content-Type", "Authorization"]) expose_headers = optional(list(string), []) max_age = optional(number, 86400) allow_credentials = optional(bool, false) }) |
null |
no |
| custom_domain |
Custom domain name configuration |
object({ domain_name = string acm_certificate_arn = string endpoint_type = optional(string, "REGIONAL") stage_key = optional(string, "default") api_mapping_key = optional(string, null) }) |
null |
no |
| description |
API description |
string |
"" |
no |
| integrations |
Map of API integrations |
map(object({ integration_type = string # AWS_PROXY, HTTP_PROXY, MOCK integration_uri = optional(string, null) integration_method = optional(string, "POST") payload_format_version = optional(string, "2.0") timeout_milliseconds = optional(number, 29000) })) |
{} |
no |
| protocol_type |
API type — HTTP or WEBSOCKET |
string |
"HTTP" |
no |
| routes |
Map of API routes |
map(object({ route_key = string integration_key = optional(string, null) authorization_type = optional(string, "NONE") authorizer_id = optional(string, null) })) |
{} |
no |
| stages |
Map of API stages to deploy |
map(object({ name = string auto_deploy = optional(bool, true) throttle_burst_limit = optional(number, 5000) throttle_rate_limit = optional(number, 10000) access_log_arn = optional(string, null) access_log_format = optional(string, "$context.requestId $context.identity.sourceIp $context.httpMethod $context.routeKey $context.status $context.responseLength $context.requestTime") default_route_settings = optional(object({ throttling_burst_limit = optional(number, 5000) throttling_rate_limit = optional(number, 10000) }), null) })) |
{ "default": { "name": "$default" }} |
no |
| tags |
Resource tags to apply to all resources |
map(string) |
{} |
no |