Skip to content

Commit

Permalink
removed push on main from Terraform Plan & Terraform Apply, removed t…
Browse files Browse the repository at this point in the history
…esting code from Ad-hoc Terraform Plan
  • Loading branch information
shanice-skylight committed Jan 10, 2025
1 parent 701f189 commit c8f3845
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ecs_terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on:
merge_group:
types:
- checks_requested
push:
branches:
- main
workflow_dispatch:
inputs:
workspace:
description: "The workspace to terraform against"
description: "Choose terraform workspace for deployment"
required: true
type: string
default: "dev"
type: choice
options:
- dev
- demo
default: dev

concurrency:
group: ${{ github.event.inputs.workspace }}-terraform
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/terraform_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ name: Ad-hoc Terraform Plan
run-name: Terraform plan ${{ inputs.workspace }} by @${{ github.actor }}

on:
pull_request:
branches:
- shanice/deploy_demo_ecs
merge_group:
types:
- checks_requested
workflow_dispatch:
inputs:
workspace:
description: "The workspace to terraform against"
description: "Choose terraform workspace for deployment"
required: true
type: string
default: "dev"
type: choice
options:
- dev
- demo
default: dev

concurrency:
group: ${{ github.event.inputs.workspace }}-terraform
Expand Down Expand Up @@ -52,7 +55,6 @@ jobs:

- name: Terraform
env:
# ACTION: ${{ env.terraform_action }}
BUCKET: ${{ secrets.TFSTATE_BUCKET }}
DYNAMODB_TABLE: ${{ secrets.TFSTATE_DYNAMODB_TABLE }}
REGION: ${{ vars.region }}
Expand All @@ -63,6 +65,7 @@ jobs:
TLS_KEY: ${{ secrets.TLS_KEY}}
shell: bash
run: |
echo "Deploying to ${{ github.event.inputs.workspace }}..."
rm -rf .terraform .terraform.lock.hcl
terraform init \
-var-file="$WORKSPACE.tfvars" \
Expand Down

0 comments on commit c8f3845

Please sign in to comment.