title | description | author | tags | date_published |
---|---|---|---|---|
Deploy HA VPN with Terraform |
Deploy Google Cloud environment used in HA VPN interop guides with Terraform. |
ashishverm |
terraform, ha vpn, |
2019-07-12 |
Ashish Verma | Technical Program Manager | Google
Contributed by Google employees.
This tutorial demonstrates how to use Terraform to deploy the High Availability VPN resources on Google Cloud that are used in the VPN interoperability guides.
Deploy HA VPN with a 1-peer-2-addresses configuration on Google Cloud.
-
This guide assumes that you are familiar with Terraform. Instructions provided in this guide are based on the Google Cloud environment depicted in the HA VPN interop guides and are only for testing purposes.
-
See Getting started with Terraform on Google Cloud to set up your Terraform environment for Google Cloud.
-
Ensure the you have a service account with sufficient permissions to deploy the resources used in this tutorial.
-
Clone the repository:
git clone https://github.com/GoogleCloudPlatform/community.git
-
Go to the
deploy-ha-vpn-with-terraform/terraform
directory:cd community/tutorials/deploy-ha-vpn-with-terraform/terraform
-
(optional) Change variable values in
gcp_variables.tf
for your environment. -
Run the following Terraform commands:
-
Examine configuration files:
terraform init terraform validate terraform plan
-
Apply the configurations:
terraform apply
-
Confirm configurations:
terraform output terraform show
-
Clean up:
terraform plan -destroy terraform destroy terraform show
-