Skip to main content

Deploy DigiTrade to GCP

This guide deploys a client's DigiTrade environment to Google Cloud Platform using the Terraform automation package.

N
Written by Niyaz

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

  1. In Clients, open the client record and select the Setting Up Automation tab.

  2. Under Client Billing Information, review Billing account and GCP Account Email. These values identify the account that owns and is billed for the deployment.

  3. In step Install Terraform, select Install Terraform.

  4. Install Terraform on your local machine. Confirm the installation in a terminal.

    terraform version

  5. Select Next to open step Install the Google Cloud SDK.

  6. In step Install the Google Cloud SDK, select Install the Google Cloud SDK.

  7. Install the gcloud command-line tool.

  8. 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

  9. Confirm the Google Cloud SDK installation in a terminal with gcloud --version.

  10. Select Next to open step Configure Instance.

  11. In step Configure Instance, open Advanced settings.

  12. 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.

  13. Select Apply.

  14. Select Next to reach step Initialize.

  15. In step Initialize, select Download ZIP.

  16. Extract the deployment package.

  17. Open a terminal in the extracted folder.

  18. Edit the package's variables file, commonly terraform.tfvars, with the client-specific values required for your delivery.

  19. Include the project ID and name, billing account ID, organization ID if used, and GCP region and zone.

  20. Review variables.tf for the complete set of declared values. Keep client values in the variables file rather than the infrastructure files.

  21. Use Terraform project structure to review the package file layout.

  22. Initialize Terraform to download the required provider plugins.

    terraform init

  23. Create an execution plan and review the resources Terraform creates.

    terraform plan -out=tfplan

  24. Apply the configuration to build the infrastructure in your GCP account. The -auto-approve flag 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.

Setting Up Automation tab with the Terraform installation step selected

Initialize step with the deployment package download and Terraform commands

Related

Did this answer your question?