Open a client record and select the Setting Up Automation tab. The deployment package separates infrastructure logic from client-specific values and organises resource definitions into Terraform (.tf) files by responsibility. The file roles help you set variables, customise a delivery, and read a failed deployment by layer. Confirm the exact file set against the package you receive through Download ZIP on the Setting Up Automation tab.
Configuration files
File | Purpose | Key contents |
main.tf | This file is the main entry point. | It contains the Google Cloud provider configuration, shared defaults such as region and zone, and optionally a backend for remote state storage. |
project.tf | This file creates the GCP project. | It contains the project resource, project name, project ID, organization ID when used, and linked billing account. |
variables.tf | This file declares input variables. | It contains variable declarations with a name, type, description, and optional defaults; values are assigned in a |
services.tf | This file enables Google Cloud APIs. | It enables APIs the deployment needs, such as Compute Engine, IAM, Cloud Resource Manager, and Billing. |
wait.tf | This file avoids race conditions. | It adds a timed pause of about 30 seconds after API enablement so dependent resources do not fail because an API is not ready. |
network.tf | This file defines core networking. | It contains Cloud NAT for outbound internet access from the private instance and a reserved static IP address for the load balancer. |
iam.tf | This file defines identity and access. | It defines a dedicated, least-privilege service account for the compute instance instead of broad default credentials. |
instances.tf | This file defines the compute host. | It contains the Compute Engine instance's machine type, boot image, and network, attaches the service account, and references the startup script. |
loadbalancer.tf | This file handles public traffic and security. | It contains the external HTTP(S) load balancer, a network endpoint group for each service, per-service health checks, and Cloud Armor policies with IP-based restrictions on the backend. |
scripts/startup.sh | This file is the instance boot script. | It installs dependencies and starts the DigiTrade storefront, admin panel, and backend, each on its own port. |
Where client values go
Put client-specific values in a variables file, commonly terraform.tfvars, rather than in the infrastructure files. Typical variables include the project ID and name, billing account ID, organization ID when used, and GCP region and zone. Review variables.tf for the full set declared by your delivery.
Notes
Keeping values in
terraform.tfvarslets you tailor a deployment per client without editing shared infrastructure files.The file roles map onto the provisioned layers.
Related

