gcp_region_list = [ ("asia-southeast1.gcp.prod.prom.integration.tidbcloud.com", "34.111.117.153"), ("us-central1.gcp.prod.prom.integration.tidbcloud.com", "34.120.244.118"), ("us-west1.gcp.prod.prom.integration.tidbcloud.com", "34.49.207.203"), ("asia-northeast1.gcp.prod.prom.integration.tidbcloud.com", "34.8.114.191"), ("asia-east1.gcp.prod.prom.integration.tidbcloud.com", "34.13.127.29"), # Newly added GCP regions — replace IP placeholders with actual external IPs ("asia-east2.gcp.prod.prom.integration.tidbcloud.com", "136.110.168.27"), ("asia-northeast2.gcp.prod.prom.integration.tidbcloud.com", "34.8.79.224"), ("asia-south1.gcp.prod.prom.integration.tidbcloud.com", "136.110.222.97"), ("europe-west3.gcp.prod.prom.integration.tidbcloud.com", "136.110.247.88"), ("us-east4.gcp.prod.prom.integration.tidbcloud.com", "35.227.223.236"), ] for dns, record_name in gcp_region_list: dns_zone = "prod.prom.integration.tidbcloud.com" plan_file = f"plan-{dns}.tfplan" state_file = f"state-{dns}.tfstate" plan_cmd = ( f'terraform plan -input=false \\\n' f' -var "domain_name={dns}" \\\n' f' -var "domain_zone_name={dns_zone}" \\\n' f' -var "record_name={record_name}" \\\n' f' -out={plan_file} \\\n' f' -state={state_file}' ) apply_cmd = f"terraform apply -input=false -state={state_file} {plan_file} " print(f"# target {dns}") print(plan_cmd) print() print(apply_cmd) print("\n" + ("-" * 60) + "\n")