From 3f10af0be5b297109db600a7d200e3ea3605a450 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 13 Mar 2026 14:35:33 +0000 Subject: [PATCH] dont try to use _deploy_lambda for cdn --- .github/workflows/deploy_terraform.yml | 42 ++++++++++++++++++++------ 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 1d84505b..ec83479d 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -351,14 +351,36 @@ jobs: # ============================================================ cloudfront_cdn: needs: [determine_stage, shared_terraform, fast_api_lambda] - uses: ./.github/workflows/_deploy_lambda.yml - with: - lambda_name: ara_cdn - lambda_path: infrastructure/terraform/cdn - stage: ${{ needs.determine_stage.outputs.stage }} - terraform_apply: ${{ needs.determine_stage.outputs.terraform_apply }} - secrets: - AWS_ACCESS_KEY_ID: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.DEV_AWS_REGION }} + runs-on: ubuntu-latest + env: + STAGE: ${{ needs.determine_stage.outputs.stage }} + TERRAFORM_APPLY: ${{ needs.determine_stage.outputs.terraform_apply }} + + steps: + - uses: actions/checkout@v4 + + - uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.DEV_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.DEV_AWS_REGION }} + + - uses: hashicorp/setup-terraform@v3 + + - name: Terraform Init + working-directory: infrastructure/terraform/cdn + run: terraform init -reconfigure + + - name: Terraform Workspace + working-directory: infrastructure/terraform/cdn + run: terraform workspace select ${STAGE} || terraform workspace new ${STAGE} + + - name: Terraform Plan + working-directory: infrastructure/terraform/cdn + run: terraform plan -var-file=${STAGE}.tfvars -out=tfplan + + - name: Terraform Apply + if: env.TERRAFORM_APPLY == 'true' + working-directory: infrastructure/terraform/cdn + run: terraform apply -auto-approve tfplan