Resource: aws_api_gateway_vpc_link

Provides an API Gateway VPC Link.

Example Usage

resource "aws_lb" "example" {
  name               = "example"
  internal           = true
  load_balancer_type = "network"

  subnet_mapping {
    subnet_id = "12345"
  }
}

resource "aws_api_gateway_vpc_link" "example" {
  name        = "example"
  description = "example description"
  target_arns = [aws_lb.example.arn]
}

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 API Gateway VPC Link using the id. For example:

import {
  to = aws_api_gateway_vpc_link.example
  id = "12345abcde"
}

Using terraform import, import API Gateway VPC Link using the id. For example:

% terraform import aws_api_gateway_vpc_link.example 12345abcde