Virtual Private Gateway Attachment
Define Customer Gateways
Define the customer gateway variable. The value for ip_address
should be the on-prem public IP.
Define Virtual Private Gateway
Define the vpn_gateway
attribute within the vpcs
variable to build a virtual private gateway in the VPC. Add routes for the on-prem subnet to the desired route tables in the VPC specifying the key for the virtual private gateway (vpn_gateway
) as the destination. Assign the route table to any subnets requiring connectivity to on-prem resources via the VPN.
Note: The example below does not represent a full VPC configuration.
Define VPNs with Routes
Define the VPN variable specifying the key for the customer_gateway
and vpn_gateway
(defined in previous steps above) to be attached. The value for vpn_gateway
should be defined as (VPC Key).(Virtual Private Gateway Key). local_ipv4_network_cidr
should be the on-prem private subnet, and remote_ipv4_network_cidr
should be the AWS private subnet. The routes
attribute should contain a list of on-prem subnets.