VPN Gateway
Terraform module to create AWS VPN gateway resources
Inputs
40 / 56
customer_gateway_idrequiredstringThe id of the Customer Gateway.
connect_to_transit_gatewayoptionalboolSet to false to disable attachment of the VPN connection route to the VPN connection (TGW uses another resource for that)
falsecreate_vpn_connectionoptionalboolSet to false to prevent the creation of a VPN Connection.
truecreate_vpn_gateway_attachmentoptionalboolSet to false to prevent attachment of the VGW to the VPC
truelocal_ipv4_network_cidroptionalstring(Optional) The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.
nulllocal_ipv6_network_cidroptionalstring(Optional) The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.
nullremote_ipv4_network_cidroptionalstring(Optional) The IPv4 CIDR on the AWS side of the VPN connection.
nullremote_ipv6_network_cidroptionalstring(Optional) The IPv6 CIDR on AWS side of the VPN connection.
nulltagsoptionalmap(string)Set of tags to be added to the VPN Connection resource (only if `create_vpn_connection = true`).
{}transit_gateway_idoptionalstringThe ID of the Transit Gateway.
nulltunnel_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.
ipv4tunnel1_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
nulltunnel1_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
nulltunnel1_enable_tunnel_lifecycle_controloptionalbool(Optional) Turn on or off tunnel endpoint lifecycle control feature for the first VPN tunnel. Valid values are true | false
nulltunnel1_ike_versionsoptionallist(string)(Optional) The IKE versions that are permitted for the first VPN tunnel. Valid values are ikev1 | ikev2
nulltunnel1_inside_cidroptionalstringThe CIDR block of the inside IP addresses for the first VPN tunnel.
""tunnel1_log_optionsoptionalany(Optional) Options for sending VPN tunnel logs to CloudWatch.
{}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
nulltunnel1_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
nulltunnel1_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
nulltunnel1_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
nulltunnel1_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
nulltunnel1_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
nulltunnel1_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
nulltunnel1_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
nulltunnel1_preshared_keyoptionalstringThe preshared key of the first VPN tunnel.
""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
nulltunnel1_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 …
nulltunnel1_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.
nulltunnel1_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
nulltunnel2_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
nulltunnel2_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
nulltunnel2_enable_tunnel_lifecycle_controloptionalbool(Optional) Turn on or off tunnel endpoint lifecycle control feature for the second VPN tunnel. Valid values are true | false
nulltunnel2_ike_versionsoptionallist(string)(Optional) The IKE versions that are permitted for the second VPN tunnel. Valid values are ikev1 | ikev2
nulltunnel2_inside_cidroptionalstringThe CIDR block of the inside IP addresses for the second VPN tunnel.
""tunnel2_log_optionsoptionalany(Optional) Options for sending VPN tunnel logs to CloudWatch.
{}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
nulltunnel2_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
nulltunnel2_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
nulltunnel2_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
null1 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_keyThe preshared key of the first VPN tunnel.
tunnel2_preshared_keyThe preshared key of the second VPN tunnel.
vpn_connection_customer_gateway_configurationThe configuration information for the VPN connection's customer gateway (in the native XML format) if `create_vpn_connection = true`, or empty otherwise
vpn_connection_idA list with the VPN Connection ID if `create_vpn_connection = true`, or empty otherwise
vpn_connection_transit_gateway_attachment_idThe transit gateway attachment ID that was generated when attaching this VPN connection.
vpn_connection_tunnel1_addressA 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_addressA 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_addressA 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_addressA 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_addressA 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_addressA 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.