2015-04-30 01:06:16 +02:00
---
layout: "aws"
page_title: "AWS: aws_customer_gateway"
sidebar_current: "docs-aws-resource-customer-gateway"
description: |-
Provides a customer gateway inside a VPC. These objects can be
2015-05-01 23:52:30 +02:00
connected to VPN gateways via VPN connections, and allow you to
establish tunnels between your network and the VPC.
2015-04-30 01:06:16 +02:00
---
# aws\_customer\_gateway
Provides a customer gateway inside a VPC. These objects can be connected to VPN gateways via VPN connections, and allow you to establish tunnels between your network and the VPC.
## Example Usage
2017-04-17 12:17:54 +02:00
```hcl
2015-04-30 01:06:16 +02:00
resource "aws_customer_gateway" "main" {
2017-02-18 23:48:50 +01:00
bgp_asn = 65000
ip_address = "172.83.124.10"
type = "ipsec.1"
tags {
Name = "main-customer-gateway"
}
2015-04-30 01:06:16 +02:00
}
```
## Argument Reference
The following arguments are supported:
* `bgp_asn` - (Required) The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).
* `ip_address` - (Required) The IP address of the gateway's Internet-routable external interface.
* `type` - (Required) The type of customer gateway. The only type AWS
supports at this time is "ipsec.1".
* `tags` - (Optional) Tags to apply to the gateway.
## Attribute Reference
The following attributes are exported:
* `id` - The amazon-assigned ID of the gateway.
* `bgp_asn` - The gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).
* `ip_address` - The IP address of the gateway's Internet-routable external interface.
* `type` - The type of customer gateway.
* `tags` - Tags applied to the gateway.
2016-07-21 00:28:59 +02:00
## Import
2017-02-18 23:48:50 +01:00
Customer Gateways can be imported using the `id` , e.g.
2016-07-21 00:28:59 +02:00
```
$ terraform import aws_customer_gateway.main cgw-b4dc3961
```