terraform_gen.py
Copies the correct cloud template to the output directory, substitutes variables, generates a terraform.tfvars file, then runs terraform fmt and terraform validate automatically.
Selects the right template directory from templates/terraform/<cloud>/, substitutes placeholder tokens throughout all .tf files, and writes 7 split files to the output directory.
Template variables substituted: {{SERVICE_NAME}}, {{REGION}}, {{ENVIRONMENT}}, {{CLUSTER_NAME}}.
web_appmicroservicebatch_jobdata_pipelinescheduled_taskbackend.tf is generated with the remote state block commented out. Bootstrap the state bucket/container first, then uncomment and run terraform init.
After writing all .tf files, the tool runs terraform fmt to normalise formatting, then terraform validate -backend=false to catch syntax and type errors without requiring real cloud credentials.