Resource: aws_vpn_gateway

Provides a resource to create a VPC VPN Gateway.

Example Usage

resource "aws_vpn_gateway" "vpn_gw" {
  vpc_id = aws_vpc.main.id

  tags = {
    Name = "main"
  }
}

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 VPN Gateways using the VPN gateway id. For example:

import {
  to = aws_vpn_gateway.testvpngateway
  id = "vgw-9a4cacf3"
}

Using terraform import, import VPN Gateways using the VPN gateway id. For example:

% terraform import aws_vpn_gateway.testvpngateway vgw-9a4cacf3