Skip to content

Commit

Permalink
feat(terraform): add option to run Apply on condition (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
hknutsen authored Nov 6, 2024
1 parent aeee06e commit 4e290ad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ on:
type: string
required: false

run_terraform_apply:
description: Run `terraform apply` for the saved plan file?
type: boolean
required: false
default: true

secrets:
AZURE_CLIENT_ID:
description: The client ID of the Azure AD service principal to use for authenticating to Azure.
Expand Down Expand Up @@ -223,7 +229,7 @@ jobs:
terraform-apply:
name: Terraform Apply
needs: terraform-plan
if: github.actor != 'dependabot[bot]' && needs.terraform-plan.outputs.upload-outcome == 'success'
if: github.actor != 'dependabot[bot]' && needs.terraform-plan.outputs.upload-outcome == 'success' && inputs.run_terraform_apply
runs-on: ${{ inputs.runs_on }}
environment: ${{ inputs.environment }}
permissions:
Expand Down

0 comments on commit 4e290ad

Please sign in to comment.