» Resource: aws_apigatewayv2_stage

Manages an Amazon API Gateway Version 2 stage. More information can be found in the Amazon API Gateway Developer Guide.

» Example Usage

» Basic

resource "aws_apigatewayv2_stage" "example" {
  api_id = "${aws_apigatewayv2_api.example.id}"
  name   = "example-stage"
}

» Argument Reference

The following arguments are supported:

The access_log_settings object supports the following:

The default_route_settings object supports the following:

  • data_trace_enabled - (Optional) Whether data trace logging is enabled for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.
  • detailed_metrics_enabled - (Optional) Whether detailed metrics are enabled for the default route. Defaults to false.
  • logging_level - (Optional) The logging level for the default route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.
  • throttling_burst_limit - (Optional) The throttling burst limit for the default route.
  • throttling_rate_limit - (Optional) The throttling rate limit for the default route.

The route_settings object supports the following:

  • route_key - (Required) Route key.
  • data_trace_enabled - (Optional) Whether data trace logging is enabled for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Defaults to false. Supported only for WebSocket APIs.
  • detailed_metrics_enabled - (Optional) Whether detailed metrics are enabled for the route. Defaults to false.
  • logging_level - (Optional) The logging level for the route. Affects the log entries pushed to Amazon CloudWatch Logs. Valid values: ERROR, INFO, OFF. Defaults to OFF. Supported only for WebSocket APIs.
  • throttling_burst_limit - (Optional) The throttling burst limit for the route.
  • throttling_rate_limit - (Optional) The throttling rate limit for the route.

» Attribute Reference

In addition to all arguments above, the following attributes are exported:

» Import

aws_apigatewayv2_stage can be imported by using the API identifier and stage name, e.g.

$ terraform import aws_apigatewayv2_stage.example aabbccddee/example-stage