Use the Terraform automation package to deploy a client's DigiTrade environment to Google Cloud Platform.
Before you begin
Complete the GCP deployment prerequisites, including Terraform, the Google Cloud SDK, authentication, and the required GCP account permissions.
Have access to the client record.
Prepare a terminal and permission to install software on your machine.
Steps
In Clients, open the client record and select the Setting Up Automation tab.
Under Client Billing Information, review Billing account and GCP Account Email. These values identify the account that owns and is billed for the deployment.
In step Install Terraform, select Install Terraform.
Install Terraform on your local machine. Confirm the installation in a terminal.
terraform version
Select Next to open step Install the Google Cloud SDK.
In step Install the Google Cloud SDK, select Install the Google Cloud SDK.
Install the
gcloudcommand-line tool.Authenticate your session with the account that owns the target project. The command opens a browser sign-in and stores application default credentials.
gcloud auth application-default login
Confirm the Google Cloud SDK installation in a terminal with
gcloud --version.Select Next to open step Configure Instance.
In step Configure Instance, open Advanced settings.
Set Region, Machine type, File System Disk Size, and Data Base Disk Size to the values required for the deployment. Use the region picker link to help choose a region.
Select Apply.
Select Next to reach step Initialize.
In step Initialize, select Download ZIP.
Extract the deployment package.
Open a terminal in the extracted folder.
Edit the package's variables file, commonly
terraform.tfvars, with the client-specific values required for your delivery.Include the project ID and name, billing account ID, organization ID if used, and GCP region and zone.
Review
variables.tffor the complete set of declared values. Keep client values in the variables file rather than the infrastructure files.Use Terraform project structure to review the package file layout.
Initialize Terraform to download the required provider plugins.
terraform init
Create an execution plan and review the resources Terraform creates.
terraform plan -out=tfplan
Apply the configuration to build the infrastructure in your GCP account. The
-auto-approveflag skips interactive confirmation, so use the previous plan review as your safeguard. If any variable changes after you create the plan, generate a fresh plan before applying it.terraform apply -auto-approve tfplan
Result
Terraform provisions the client's environment, including the GCP project, networking, compute host, public load balancer, and security policies. Verify the result layer by layer using Automated GCP deployment overview. If something fails, see GCP deployment troubleshooting and recovery.
Related


