Skip to content

Commit a81c79f

Browse files
committed
fix: try instead to consolidate all on ap-southeast-1
1 parent 6f7e93a commit a81c79f

18 files changed

+42
-42
lines changed

.github/workflows/ami-release-nix-single.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: aws-actions/configure-aws-credentials@v4
3232
with:
3333
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
34-
aws-region: "us-east-1"
34+
aws-region: "ap-southeast-1"
3535
output-credentials: true
3636
role-duration-seconds: 7200
3737

@@ -97,7 +97,7 @@ jobs:
9797
uses: aws-actions/configure-aws-credentials@v4
9898
with:
9999
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
100-
aws-region: "us-east-1"
100+
aws-region: "ap-southeast-1"
101101

102102
- name: Upload software manifest to s3 staging
103103
run: |
@@ -118,7 +118,7 @@ jobs:
118118
uses: aws-actions/configure-aws-credentials@v4
119119
with:
120120
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
121-
aws-region: "us-east-1"
121+
aws-region: "ap-southeast-1"
122122

123123
- name: Upload software manifest to s3 prod
124124
run: |

.github/workflows/ami-release-nix.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
uses: aws-actions/configure-aws-credentials@v4
5656
with:
5757
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
58-
aws-region: "us-east-1"
58+
aws-region: "ap-southeast-1"
5959
output-credentials: true
6060
role-duration-seconds: 7200
6161

@@ -123,7 +123,7 @@ jobs:
123123
uses: aws-actions/configure-aws-credentials@v4
124124
with:
125125
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
126-
aws-region: "us-east-1"
126+
aws-region: "ap-southeast-1"
127127

128128
- name: Upload software manifest to s3 staging
129129
run: |
@@ -144,7 +144,7 @@ jobs:
144144
uses: aws-actions/configure-aws-credentials@v4
145145
with:
146146
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
147-
aws-region: "us-east-1"
147+
aws-region: "ap-southeast-1"
148148

149149
- name: Upload software manifest to s3 prod
150150
run: |

.github/workflows/mirror.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: aws-actions/configure-aws-credentials@v2.2.0
2929
with:
3030
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
31-
aws-region: us-east-1
31+
aws-region: ap-southeast-1
3232
- uses: docker/login-action@v2
3333
with:
3434
registry: public.ecr.aws

.github/workflows/nix-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
if: ${{ github.secret_source == 'Actions' }}
4141
with:
4242
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
43-
aws-region: "us-east-1"
43+
aws-region: "ap-southeast-1"
4444
output-credentials: true
4545
role-duration-seconds: 7200
4646
- name: Setup AWS credentials for Nix

.github/workflows/publish-migrations-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: aws-actions/configure-aws-credentials@v1
3333
with:
3434
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
35-
aws-region: "us-east-1"
35+
aws-region: "ap-southeast-1"
3636

3737
- name: Deploy to S3 prod
3838
shell: bash

.github/workflows/publish-migrations-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: aws-actions/configure-aws-credentials@v1
2626
with:
2727
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
28-
aws-region: "us-east-1"
28+
aws-region: "ap-southeast-1"
2929

3030
- name: Deploy to S3 staging
3131
shell: bash

.github/workflows/publish-nix-pgupgrade-bin-flake-version.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
uses: aws-actions/configure-aws-credentials@v1
6363
with:
6464
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
65-
aws-region: "us-east-1"
65+
aws-region: "ap-southeast-1"
6666

6767
- name: Upload pg_upgrade scripts to s3 staging
6868
run: |
@@ -111,7 +111,7 @@ jobs:
111111
uses: aws-actions/configure-aws-credentials@v1
112112
with:
113113
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
114-
aws-region: "us-east-1"
114+
aws-region: "ap-southeast-1"
115115

116116
- name: Upload pg_upgrade scripts to s3 prod
117117
run: |

.github/workflows/publish-nix-pgupgrade-scripts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
uses: aws-actions/configure-aws-credentials@v1
6868
with:
6969
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
70-
aws-region: "us-east-1"
70+
aws-region: "ap-southeast-1"
7171

7272
- name: Upload pg_upgrade scripts to s3 staging
7373
run: |
@@ -118,7 +118,7 @@ jobs:
118118
uses: aws-actions/configure-aws-credentials@v1
119119
with:
120120
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
121-
aws-region: "us-east-1"
121+
aws-region: "ap-southeast-1"
122122

123123
- name: Upload pg_upgrade scripts to s3 prod
124124
run: |

.github/workflows/qemu-image-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
uses: aws-actions/configure-aws-credentials@v4
104104
with:
105105
role-to-assume: ${{ secrets.CONTROL_PLANE_DEV_ROLE }}
106-
aws-region: "us-east-1"
106+
aws-region: "ap-southeast-1"
107107

108108
- name: Login to Amazon ECR
109109
id: login-ecr-private-dev
@@ -117,7 +117,7 @@ jobs:
117117
118118
- name: Push docker image to Amazon ECR
119119
env:
120-
REGISTRY: 812073016711.dkr.ecr.us-east-1.amazonaws.com
120+
REGISTRY: 812073016711.dkr.ecr.ap-southeast-1.amazonaws.com
121121
REPOSITORY: postgres-vm-image
122122
IMAGE_TAG: ${{ steps.process_release_version.outputs.version }}
123123
run: |
@@ -129,15 +129,15 @@ jobs:
129129
uses: aws-actions/configure-aws-credentials@v4
130130
with:
131131
role-to-assume: ${{ secrets.CONTROL_PLANE_PROD_ROLE }}
132-
aws-region: "us-east-1"
132+
aws-region: "ap-southeast-1"
133133

134134
- name: Login to Amazon ECR
135135
id: login-ecr-private-prod
136136
uses: aws-actions/amazon-ecr-login@v2
137137

138138
- name: Push docker image to Amazon ECR
139139
env:
140-
REGISTRY: 156470330064.dkr.ecr.us-east-1.amazonaws.com
140+
REGISTRY: 156470330064.dkr.ecr.ap-southeast-1.amazonaws.com
141141
REPOSITORY: postgres-vm-image
142142
IMAGE_TAG: ${{ steps.process_release_version.outputs.version }}
143143
run: |

.github/workflows/testinfra-ami-build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
uses: aws-actions/configure-aws-credentials@v4
6868
with:
6969
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
70-
aws-region: "us-east-1"
70+
aws-region: "ap-southeast-1"
7171
output-credentials: true
7272
role-duration-seconds: 7200
7373

@@ -112,13 +112,13 @@ jobs:
112112
run: |
113113
GIT_SHA=${{github.sha}}
114114
nix run github:supabase/postgres/${GIT_SHA}#packer -- init amazon-arm64-nix.pkr.hcl
115-
nix run github:supabase/postgres/${GIT_SHA}#packer -- build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${EXECUTION_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=" -var "postgres-version=${{ steps.random.outputs.random_string }}" -var "region=us-east-1" -var 'ami_regions=["us-east-1"]' -var "force-deregister=true" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl
115+
nix run github:supabase/postgres/${GIT_SHA}#packer -- build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${EXECUTION_ID}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "ansible_arguments=" -var "postgres-version=${{ steps.random.outputs.random_string }}" -var "region=ap-southeast-1" -var 'ami_regions=["ap-southeast-1"]' -var "force-deregister=true" -var "ansible_arguments=-e postgresql_major=${POSTGRES_MAJOR_VERSION}" amazon-arm64-nix.pkr.hcl
116116
117117
- name: Build AMI stage 2
118118
run: |
119119
GIT_SHA=${{github.sha}}
120120
nix run github:supabase/postgres/${GIT_SHA}#packer -- init stage2-nix-psql.pkr.hcl
121-
nix run github:supabase/postgres/${GIT_SHA}#packer -- build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${EXECUTION_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "postgres-version=${{ steps.random.outputs.random_string }}" -var "region=us-east-1" -var 'ami_regions=["us-east-1"]' -var "force-deregister=true" -var "git_sha=${GITHUB_SHA}" stage2-nix-psql.pkr.hcl
121+
nix run github:supabase/postgres/${GIT_SHA}#packer -- build -var "git-head-version=${GIT_SHA}" -var "packer-execution-id=${EXECUTION_ID}" -var "postgres_major_version=${POSTGRES_MAJOR_VERSION}" -var-file="development-arm.vars.pkr.hcl" -var-file="common-nix.vars.pkr.hcl" -var "postgres-version=${{ steps.random.outputs.random_string }}" -var "region=ap-southeast-1" -var 'ami_regions=["ap-southeast-1"]' -var "force-deregister=true" -var "git_sha=${GITHUB_SHA}" stage2-nix-psql.pkr.hcl
122122
123123
- name: Run tests
124124
timeout-minutes: 10
@@ -132,12 +132,12 @@ jobs:
132132
- name: Cleanup resources on build cancellation
133133
if: ${{ cancelled() }}
134134
run: |
135-
aws ec2 --region us-east-1 describe-instances --filters "Name=tag:packerExecutionId,Values=${EXECUTION_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --region us-east-1 --instance-ids
135+
aws ec2 --region ap-southeast-1 describe-instances --filters "Name=tag:packerExecutionId,Values=${EXECUTION_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --region ap-southeast-1 --instance-ids
136136
137137
- name: Cleanup resources after build
138138
if: ${{ always() }}
139139
run: |
140-
aws ec2 --region us-east-1 describe-instances --filters "Name=tag:testinfra-run-id,Values=${EXECUTION_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --region us-east-1 --instance-ids || true
140+
aws ec2 --region ap-southeast-1 describe-instances --filters "Name=tag:testinfra-run-id,Values=${EXECUTION_ID}" --query "Reservations[].Instances[].InstanceId" --output text | xargs -r aws ec2 terminate-instances --region ap-southeast-1 --instance-ids || true
141141
142142
- name: Cleanup AMIs
143143
if: always()
@@ -149,10 +149,10 @@ jobs:
149149
# Function to deregister AMIs by name pattern
150150
deregister_ami_by_name() {
151151
local ami_name_pattern=$1
152-
local ami_ids=$(aws ec2 describe-images --region us-east-1 --owners self --filters "Name=name,Values=${ami_name_pattern}" --query 'Images[*].ImageId' --output text)
152+
local ami_ids=$(aws ec2 describe-images --region ap-southeast-1 --owners self --filters "Name=name,Values=${ami_name_pattern}" --query 'Images[*].ImageId' --output text)
153153
for ami_id in $ami_ids; do
154154
echo "Deregistering AMI: $ami_id"
155-
aws ec2 deregister-image --region us-east-1 --image-id $ami_id
155+
aws ec2 deregister-image --region ap-southeast-1 --image-id $ami_id
156156
done
157157
}
158158

0 commit comments

Comments
 (0)