Resource: 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

resource "aws_customer_gateway" "main" {
  bgp_asn    = 65000
  ip_address = "172.83.124.10"
  type       = "ipsec.1"

  tags = {
    Name = "main-customer-gateway"
  }
}

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

import {
  to = aws_customer_gateway.main
  id = "cgw-b4dc3961"
}

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

% terraform import aws_customer_gateway.main cgw-b4dc3961