made terraform apply work

This commit is contained in:
Jun-te Kim 2026-02-09 12:26:59 +00:00
parent e6d994e0b0
commit ffbb621282
2 changed files with 11 additions and 8 deletions

View file

@ -23,6 +23,14 @@ on:
required: true
type: string
terraform_apply:
required: false
type: choice
default: 'false'
options:
- 'true'
- 'false'
secrets:
AWS_ACCESS_KEY_ID:
required: true
@ -86,14 +94,7 @@ jobs:
-var="image_digest=${{ inputs.image_digest }}" \
-out=lambdaplan
- name: Wait for Approval
uses: trstringer/manual-approval@v1
with:
secret: ${{ secrets.GITHUB_TOKEN }}
approvers: developers
issue-title: "Click to approve Terraform Apply for ${{ inputs.lambda_name }} (${{ inputs.stage }})"
issue-body: "Press approve to proceed with Terraform Apply"
- name: Terraform Apply
if: inputs.terraform_apply == 'true' || inputs.stage == 'dev' || inputs.stage == 'main'
working-directory: ${{ inputs.lambda_path }}
run: terraform apply -auto-approve lambdaplan

View file

@ -133,6 +133,8 @@ jobs:
stage: ${{ needs.determine_stage.outputs.stage }}
ecr_repo: postcode_splitter-${{ needs.determine_stage.outputs.stage }}
image_digest: ${{ needs.postcodeSplitter_image.outputs.image_digest }}
# This should not be deployed in production!!!!
terraform_apply: 'true'
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}