Skip to content

Commit e64fd75

Browse files
committed
Workflows - Set correct aws_account_name
1 parent 57e8ece commit e64fd75

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/deploy-blue-green.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ jobs:
99
deploy-green:
1010
uses: ./.github/workflows/deploy-template.yml
1111
with:
12-
environment: green
12+
environment: green
13+
aws_account_name: int

.github/workflows/deploy-template.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
environment:
77
required: true
88
type: string
9+
aws_account_name:
10+
required: true
11+
type: string
912

1013
jobs:
1114
terraform-plan:
@@ -35,15 +38,14 @@ jobs:
3538

3639
- name: Terraform Init
3740
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
38-
run: |
39-
export ENVIRONMENT=${{ inputs.environment }}
41+
run: |
4042
export BUCKET_NAME=${{ vars.TERRAFORM_STATE_BUCKET_NAME_INT }}
41-
make init
43+
make init environment=${{ inputs.environment }} aws_account_name=${{ inputs.aws_account_name }}
4244
4345
- name: Terraform Plan
4446
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
4547
run: |
46-
make plan environment=${{ inputs.environment }} aws_account_name=int
48+
make plan environment=${{ inputs.environment }} aws_account_name=${{ inputs.aws_account_name }}
4749
4850
terraform-apply:
4951
if: ${{ vars.SKIP_APPLY != 'true' }}
@@ -71,14 +73,13 @@ jobs:
7173
- name: Terraform Init
7274
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
7375
run: |
74-
export ENVIRONMENT=${{ inputs.environment }}
7576
export BUCKET_NAME=${{ vars.TERRAFORM_STATE_BUCKET_NAME_INT }}
76-
make init
77+
make init environment=${{ inputs.environment }} aws_account_name=${{ inputs.aws_account_name }}
7778
7879
- name: Terraform Apply
7980
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
8081
run: |
81-
make plan environment=${{ inputs.environment }} aws_account_name=int
82+
make plan environment=${{ inputs.environment }} aws_account_name=${{ inputs.aws_account_name }}
8283
8384
e2e-tests:
8485
if: ${{ vars.RUN_E2E == 'true' && inputs.environment == vars.ACTIVE_ENVIRONMENT }}

0 commit comments

Comments
 (0)