File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change 88 description : " Environment to deploy to"
99 required : true
1010 default : " dev"
11- type : choice
12- options :
13- - dev
14- - ref
15- - int
16- - dev-sandbox
17- - ref-sandbox
18- - int-sandbox
11+ type : environment
12+
1913 branch_name :
2014 description : Branch to deploy
2115 required : true
@@ -128,6 +122,12 @@ jobs:
128122 --var assume_role=terraform \
129123 -out tfplan
130124
125+ - name : Save Terraform Plan
126+ run : |
127+ terraform -chdir=terraform/infrastructure show -no-color tfplan > terraform/infrastructure/tfplan.txt
128+ aws s3 cp terraform/infrastructure/tfplan s3://nhsd-nrlf--mgmt--github-ci-logging/${{ inputs.environment }}/${{ github.run_id }}/tfplan
129+ aws s3 cp terraform/infrastructure/tfplan.txt s3://nhsd-nrlf--mgmt--github-ci-logging/${{ inputs.environment }}/${{ github.run_id }}/tfplan.txt
130+
131131 terraform-apply :
132132 name : Terraform Apply - ${{ inputs.environment }}
133133 needs : [terraform-plan]
@@ -157,19 +157,16 @@ jobs:
157157 name : build-artifacts
158158 path : dist
159159
160- - name : Download Terraform Plan artifact
161- uses : actions/download-artifact@v4
162- with :
163- name : tfplan-output
164- path : terraform/infrastructure
165-
166160 - name : Configure AWS Credentials
167161 uses : aws-actions/configure-aws-credentials@v4
168162 with :
169163 aws-region : eu-west-2
170164 role-to-assume : ${{ secrets.CI_ROLE_NAME }}
171165 role-session-name : github-actions-ci-${{ inputs.environment }}-${{ github.run_id}}
172166
167+ - name : Download Terraform Plan artifact
168+ run : aws s3 cp s3://nhsd-nrlf--mgmt--github-ci-logging/${{ inputs.environment }}/${{ github.run_id }}/tfplan terraform/infrastructure/tfplan
169+
173170 - name : Get AWS Account ID
174171 id : get_account_id
175172 run : |
You can’t perform that action at this time.
0 commit comments