» aviatrix_aws_tgw_vpn_conn

The aviatrix_aws_tgw_vpn_conn resource allows the creation and management of Aviatrix AWS TGW VPN connections in their selected Security Domain.

» Example Usage

# Create an Aviatrix AWS TGW VPN Connection (dynamic)
resource "aviatrix_aws_tgw_vpn_conn" "test_aws_tgw_vpn_conn" {
  tgw_name          = "test-tgw1"
  route_domain_name = "Default_Domain"
  connection_name   = "my-conn1"
  connection_type   = "dynamic"
  public_ip         = "40.0.0.0"
  remote_as_number  = "12"
}
# Create an Aviatrix AWS TGW VPN Connection (static)
resource "aviatrix_aws_tgw_vpn_conn" "test_aws_tgw_vpn_conn" {
  tgw_name          = "test-tgw1"
  route_domain_name = "Default_Domain"
  connection_name   = "my-conn1"
  connection_type   = "static"
  public_ip         = "40.0.0.0"
  remote_cidr       = "16.0.0.0/16,16.1.0.0/16"
}

» Argument Reference

The following arguments are supported:

» Required

  • tgw_name - (Required) This parameter represents the name of an AWS TGW.
  • route_domain_name - (Required) The name of a route domain, to which the vpn will be attached.
  • connection_name - (Required) Unique name of the connection.
  • public_ip - (Required) Public IP address. Example: "40.0.0.0".
  • connection_type - (Optional) Connection type. Valid values: 'dynamic', 'static'. 'dynamic' stands for a BGP VPN connection; 'static' stands for a static VPN connection. Default value: 'dynamic'.
  • remote_as_number - (Optional) AWS side as a number. Integer between 1-4294967294. Example: "12". Required for a dynamic VPN connection.
  • remote_cidr - (Optional) Remote CIDRs separated by ",". Example: AWS: "16.0.0.0/16,16.1.0.0/16". Required for a static VPN connection.

» Optional

» Attribute Reference

In addition to all arguments above, the following attributes are exported:

  • vpn_id - ID of the VPN generated by creation of the connection.

» Import

aws_tgw_vpn_conn can be imported using the tgw_name and vpn_id, e.g.

$ terraform import aviatrix_aws_tgw_vpn_conn.test tgw_name~vpn_id