Resource: aws_apigatewayv2_api_mapping

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

Example Usage

Basic

resource "aws_apigatewayv2_api_mapping" "example" {
  api_id      = aws_apigatewayv2_api.example.id
  domain_name = aws_apigatewayv2_domain_name.example.id
  stage       = aws_apigatewayv2_stage.example.id
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import aws_apigatewayv2_api_mapping using the API mapping identifier and domain name. For example:

import {
  to = aws_apigatewayv2_api_mapping.example
  id = "1122334/ws-api.example.com"
}

Using terraform import, import aws_apigatewayv2_api_mapping using the API mapping identifier and domain name. For example:

% terraform import aws_apigatewayv2_api_mapping.example 1122334/ws-api.example.com