# 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 aws_region_list = [ ("ap-northeast-1.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-c7dde9eba0-746248530.ap-northeast-1.elb.amazonaws.com"), ("ap-southeast-3.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-80b257c79b-611535737.ap-southeast-3.elb.amazonaws.com"), ("ap-northeast-2.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-9319516660-1744900862.ap-northeast-2.elb.amazonaws.com"), ("ap-south-1.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-839a79f81a-482212331.ap-south-1.elb.amazonaws.com"), ("ap-southeast-1.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-78c5e16344-1988546823.ap-southeast-1.elb.amazonaws.com"), ("eu-central-1.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-c32571fee5-1830294655.eu-central-1.elb.amazonaws.com"), ("us-east-1.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-3505edfafe-1130414109.us-east-1.elb.amazonaws.com"), ("us-west-2.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-0cfa5b008d-629146943.us-west-2.elb.amazonaws.com"), ("ap-southeast-5.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-944e37d68f-2067083816.ap-southeast-5.elb.amazonaws.com"), ("ap-east-1.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-5a52caba4b-963555760.ap-east-1.elb.amazonaws.com"), ("eu-west-1.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-97d1b78cf5-1363231049.eu-west-1.elb.amazonaws.com") ] # Newly added regions — placeholders for load balancer DNS names. # Replace the second element (lb DNS) with the actual ELB DNS name before running terraform. aws_region_list.extend([ ("af-south-1.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-83c9943a91-602997959.af-south-1.elb.amazonaws.com"), ("ap-northeast-3.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-9de97faefc-1623878967.ap-northeast-3.elb.amazonaws.com"), ("ap-southeast-2.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-36edc7d88c-605589728.ap-southeast-2.elb.amazonaws.com"), ("ap-southeast-7.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-17a05827bd-1430183423.ap-southeast-7.elb.amazonaws.com"), ("sa-east-1.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-764165bc2a-1302772840.sa-east-1.elb.amazonaws.com"), ("us-east-2.aws.prod.prom.integration.tidbcloud.com", "k8s-promethe-prominte-6a2385eb26-1429480624.us-east-2.elb.amazonaws.com"), ]) for dns, lb_dns in aws_region_list: dns_zone = "prod.prom.integration.tidbcloud.com" lb_name = '-'.join(lb_dns.split('-')[0:4]) region = dns.split('.')[0] plan_file = f"plan-{dns}.tfplan" state_file = f"state-{dns}.tfstate" plan_cmd = ( f'terraform plan -input=false \\\n' f' -var "lb_name={lb_name}" \\\n' f' -var "domain_name={dns}" \\\n' f' -var "dns_zone_name={dns_zone}" \\\n' f' -var "region={region}" \\\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")