FEATURES PRICING ABOUT DOCS LOGIN

aws_vpn_connection

Provides a VPN connection connected to a VPC. These objects can be connected to customer gateways, and allow you to establish tunnels between your network and the VPC.

Example Usage

resource "aws_vpc" "vpc" {
    cidr_block = "10.0.0.0/16"
}

resource "aws_vpn_gateway" "vpn_gateway" {
    vpc_id = "${aws_vpc.vpc.id}"
}

resource "aws_customer_gateway" "customer_gateway" {
    bgp_asn = 65000
    ip_address = "172.0.0.1"
    type = "ipsec.1"
}

resource "aws_vpn_connection" "main" {
    vpn_gateway_id = "${aws_vpn_gateway.vpn_gateway.id}"
    customer_gateway_id = "${aws_customer_gateway.customer_gateway.id}"
    type = "ipsec.1"
    static_routes_only = true
}

Argument Reference

The following arguments are supported:

Attribute Reference

The following attributes are exported:

Import

VPN Connections can be imported using the vpn connection id, e.g.

$ terraform import aws_vpn_connection.testvpnconnection vpn-40f41529

See the source of this document at Terraform.io

REQUEST A DEMO