Manages an Amazon API Gateway Version 2 VPC Link.
resource "aws_apigatewayv2_vpc_link" "example" {
name = "example"
security_group_ids = [data.aws_security_group.example.id]
subnet_ids = data.aws_subnets.example.ids
tags = {
Usage = "example"
}
}
This resource supports the following arguments:
name
- (Required) Name of the VPC Link. Must be between 1 and 128 characters in length.security_group_ids
- (Required) Security group IDs for the VPC Link.subnet_ids
- (Required) Subnet IDs for the VPC Link.tags
- (Optional) Map of tags to assign to the VPC Link. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.This resource exports the following attributes in addition to the arguments above:
id
- VPC Link identifier.arn
- VPC Link ARN.tags_all
- Map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.In Terraform v1.5.0 and later, use an import
block to import aws_apigatewayv2_vpc_link
using the VPC Link identifier. For example:
import {
to = aws_apigatewayv2_vpc_link.example
id = "aabbccddee"
}
Using terraform import
, import aws_apigatewayv2_vpc_link
using the VPC Link identifier. For example:
% terraform import aws_apigatewayv2_vpc_link.example aabbccddee