Module library

VPN Gateway

Terraform module to create AWS VPN gateway resources

Inputs

40 / 56
customer_gateway_idrequiredstring

The id of the Customer Gateway.

connect_to_transit_gatewayoptionalbool

Set to false to disable attachment of the VPN connection route to the VPN connection (TGW uses another resource for that)

Defaultfalse
create_vpn_connectionoptionalbool

Set to false to prevent the creation of a VPN Connection.

Defaulttrue
create_vpn_gateway_attachmentoptionalbool

Set to false to prevent attachment of the VGW to the VPC

Defaulttrue
local_ipv4_network_cidroptionalstring

(Optional) The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

Defaultnull
local_ipv6_network_cidroptionalstring

(Optional) The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

Defaultnull
remote_ipv4_network_cidroptionalstring

(Optional) The IPv4 CIDR on the AWS side of the VPN connection.

Defaultnull
remote_ipv6_network_cidroptionalstring

(Optional) The IPv6 CIDR on AWS side of the VPN connection.

Defaultnull
tagsoptionalmap(string)

Set of tags to be added to the VPN Connection resource (only if `create_vpn_connection = true`).

Default{}
transit_gateway_idoptionalstring

The ID of the Transit Gateway.

Defaultnull
tunnel_inside_ip_versionoptionalstring

(Optional) Indicate whether the VPN tunnels process IPv4 or IPv6 traffic. Valid values are ipv4 | ipv6. ipv6 Supports only EC2 Transit Gateway.

Defaultipv4
tunnel1_dpd_timeout_actionoptionalstring

(Optional, Default clear) The action to take after DPD timeout occurs for the first VPN tunnel. Specify restart to restart the IKE initiation. Specify clear to end the IKE session. Valid values are clear | none | restart

Defaultnull
tunnel1_dpd_timeout_secondsoptionalnumber

(Optional, Default 30) The number of seconds after which a DPD timeout occurs for the first VPN tunnel. Valid value is equal or higher than 30

Defaultnull
tunnel1_enable_tunnel_lifecycle_controloptionalbool

(Optional) Turn on or off tunnel endpoint lifecycle control feature for the first VPN tunnel. Valid values are true | false

Defaultnull
tunnel1_ike_versionsoptionallist(string)

(Optional) The IKE versions that are permitted for the first VPN tunnel. Valid values are ikev1 | ikev2

Defaultnull
tunnel1_inside_cidroptionalstring

The CIDR block of the inside IP addresses for the first VPN tunnel.

Default""
tunnel1_log_optionsoptionalany

(Optional) Options for sending VPN tunnel logs to CloudWatch.

Default{}
tunnel1_phase1_dh_group_numbersoptionallist(number)

(Optional) List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 1 IKE negotiations. Valid values are 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

Defaultnull
tunnel1_phase1_encryption_algorithmsoptionallist(string)

(Optional) List of one or more encryption algorithms that are permitted for the first VPN tunnel for phase 1 IKE negotiations. Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

Defaultnull
tunnel1_phase1_integrity_algorithmsoptionallist(string)

(Optional) One or more integrity algorithms that are permitted for the first VPN tunnel for phase 1 IKE negotiations. Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512

Defaultnull
tunnel1_phase1_lifetime_secondsoptionalnumber

(Optional, Default 28800) The lifetime for phase 1 of the IKE negotiation for the first VPN tunnel, in seconds. Valid value is between 900 and 28800

Defaultnull
tunnel1_phase2_dh_group_numbersoptionallist(number)

(Optional) List of one or more Diffie-Hellman group numbers that are permitted for the first VPN tunnel for phase 2 IKE negotiations. Valid values are 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

Defaultnull
tunnel1_phase2_encryption_algorithmsoptionallist(string)

(Optional) List of one or more encryption algorithms that are permitted for the first VPN tunnel for phase 2 IKE negotiations. Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

Defaultnull
tunnel1_phase2_integrity_algorithmsoptionallist(string)

(Optional) List of one or more integrity algorithms that are permitted for the first VPN tunnel for phase 2 IKE negotiations. Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512

Defaultnull
tunnel1_phase2_lifetime_secondsoptionalnumber

(Optional, Default 3600) The lifetime for phase 2 of the IKE negotiation for the first VPN tunnel, in seconds. Valid value is between 900 and 3600

Defaultnull
tunnel1_preshared_keyoptionalstring

The preshared key of the first VPN tunnel.

Default""
tunnel1_rekey_fuzz_percentageoptionalnumber

(Optional, Default 100) The percentage of the rekey window for the first VPN tunnel (determined by tunnel1_rekey_margin_time_seconds) during which the rekey time is randomly selected. Valid value is between 0 and 100

Defaultnull
tunnel1_rekey_margin_time_secondsoptionalnumber

(Optional, Default 540) The margin time, in seconds, before the phase 2 lifetime expires, during which the AWS side of the first VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for tunnel1_rekey_fuzz_percentage. Valid value is between 60 and …

Defaultnull
tunnel1_replay_window_sizeoptionalnumber

(Optional, Default 1024) The number of packets in an IKE replay window for the first VPN tunnel. Valid value is between 64 and 2048.

Defaultnull
tunnel1_startup_actionoptionalstring

(Optional, Default add) The action to take when the establishing the tunnel for the first VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for AWS to initiate the IKE negotiation. Valid values are add | start

Defaultnull
tunnel2_dpd_timeout_actionoptionalstring

(Optional, Default clear) The action to take after DPD timeout occurs for the second VPN tunnel. Specify restart to restart the IKE initiation. Specify clear to end the IKE session. Valid values are clear | none | restart

Defaultnull
tunnel2_dpd_timeout_secondsoptionalnumber

(Optional, Default 30) The number of seconds after which a DPD timeout occurs for the second VPN tunnel. Valid value is equal or higher than 30

Defaultnull
tunnel2_enable_tunnel_lifecycle_controloptionalbool

(Optional) Turn on or off tunnel endpoint lifecycle control feature for the second VPN tunnel. Valid values are true | false

Defaultnull
tunnel2_ike_versionsoptionallist(string)

(Optional) The IKE versions that are permitted for the second VPN tunnel. Valid values are ikev1 | ikev2

Defaultnull
tunnel2_inside_cidroptionalstring

The CIDR block of the inside IP addresses for the second VPN tunnel.

Default""
tunnel2_log_optionsoptionalany

(Optional) Options for sending VPN tunnel logs to CloudWatch.

Default{}
tunnel2_phase1_dh_group_numbersoptionallist(number)

(Optional) List of one or more Diffie-Hellman group numbers that are permitted for the second VPN tunnel for phase 1 IKE negotiations. Valid values are 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

Defaultnull
tunnel2_phase1_encryption_algorithmsoptionallist(string)

(Optional) List of one or more encryption algorithms that are permitted for the second VPN tunnel for phase 1 IKE negotiations. Valid values are AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

Defaultnull
tunnel2_phase1_integrity_algorithmsoptionallist(string)

(Optional) One or more integrity algorithms that are permitted for the second VPN tunnel for phase 1 IKE negotiations. Valid values are SHA1 | SHA2-256 | SHA2-384 | SHA2-512

Defaultnull
tunnel2_phase1_lifetime_secondsoptionalnumber

(Optional, Default 28800) The lifetime for phase 1 of the IKE negotiation for the second VPN tunnel, in seconds. Valid value is between 900 and 28800

Defaultnull

1 of 56 must be supplied; the rest have defaults. Showing 40, so the site stays a static download — the remaining 16 are in the source.

Outputs

11
tunnel1_preshared_key

The preshared key of the first VPN tunnel.

tunnel2_preshared_key

The preshared key of the second VPN tunnel.

vpn_connection_customer_gateway_configuration

The configuration information for the VPN connection's customer gateway (in the native XML format) if `create_vpn_connection = true`, or empty otherwise

vpn_connection_id

A list with the VPN Connection ID if `create_vpn_connection = true`, or empty otherwise

vpn_connection_transit_gateway_attachment_id

The transit gateway attachment ID that was generated when attaching this VPN connection.

vpn_connection_tunnel1_address

A list with the the public IP address of the first VPN tunnel if `create_vpn_connection = true`, or empty otherwise

vpn_connection_tunnel1_cgw_inside_address

A list with the the RFC 6890 link-local address of the first VPN tunnel (Customer Gateway Side) if `create_vpn_connection = true`, or empty otherwise

vpn_connection_tunnel1_vgw_inside_address

A list with the the RFC 6890 link-local address of the first VPN tunnel (VPN Gateway Side) if `create_vpn_connection = true`, or empty otherwise

vpn_connection_tunnel2_address

A list with the the public IP address of the second VPN tunnel if `create_vpn_connection = true`, or empty otherwise

vpn_connection_tunnel2_cgw_inside_address

A list with the the RFC 6890 link-local address of the second VPN tunnel (Customer Gateway Side) if `create_vpn_connection = true`, or empty otherwise

vpn_connection_tunnel2_vgw_inside_address

A list with the the RFC 6890 link-local address of the second VPN tunnel (VPN Gateway Side) if `create_vpn_connection = true`, or empty otherwise

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.