github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/vpn_connection.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_vpn_connection"
     4  sidebar_current: "docs-aws-resource-vpn-connection"
     5  description: |-
     6    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.
     7  ---
     8  
     9  # aws\_vpn\_connection
    10  
    11  
    12  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.
    13  
    14  ## Example Usage
    15  
    16  ```hcl
    17  resource "aws_vpc" "vpc" {
    18    cidr_block = "10.0.0.0/16"
    19  }
    20  
    21  resource "aws_vpn_gateway" "vpn_gateway" {
    22    vpc_id = "${aws_vpc.vpc.id}"
    23  }
    24  
    25  resource "aws_customer_gateway" "customer_gateway" {
    26    bgp_asn    = 65000
    27    ip_address = "172.0.0.1"
    28    type       = "ipsec.1"
    29  }
    30  
    31  resource "aws_vpn_connection" "main" {
    32    vpn_gateway_id      = "${aws_vpn_gateway.vpn_gateway.id}"
    33    customer_gateway_id = "${aws_customer_gateway.customer_gateway.id}"
    34    type                = "ipsec.1"
    35    static_routes_only  = true
    36  }
    37  ```
    38  
    39  ## Argument Reference
    40  
    41  The following arguments are supported:
    42  
    43  * `customer_gateway_id` - (Required) The ID of the customer gateway.
    44  * `static_routes_only` - (Optional, Default `false`) Whether the VPN connection uses static routes exclusively. Static routes must be used for devices that don't support BGP.
    45  * `tags` - (Optional) Tags to apply to the connection.
    46  * `type` - (Required) The type of VPN connection. The only type AWS supports at this time is "ipsec.1".
    47  * `vpn_gateway_id` - (Required) The ID of the virtual private gateway.
    48  
    49  ## Attribute Reference
    50  
    51  The following attributes are exported:
    52  
    53  * `id` - The amazon-assigned ID of the VPN connection.
    54  * `customer_gateway_configuration` - The configuration information for the VPN connection's customer gateway (in the native XML format).
    55  * `customer_gateway_id` - The ID of the customer gateway to which the connection is attached.
    56  * `static_routes_only` - Whether the VPN connection uses static routes exclusively.
    57  * `tags` - Tags applied to the connection.
    58  * `tunnel1_address` - The public IP address of the first VPN tunnel.
    59  * `tunnel1_preshared_key` - The preshared key of the first VPN tunnel.
    60  * `tunnel2_address` - The public IP address of the second VPN tunnel.
    61  * `tunnel2_preshared_key` - The preshared key of the second VPN tunnel.
    62  * `type` - The type of VPN connection.
    63  * `vpn_gateway_id` - The ID of the virtual private gateway to which the connection is attached.
    64  
    65  
    66  ## Import
    67  
    68  VPN Connections can be imported using the `vpn connection id`, e.g.
    69  
    70  ```
    71  $ terraform import aws_vpn_connection.testvpnconnection vpn-40f41529
    72  ```