Terraform Provisioning Prod Apply #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://developer.hashicorp.com/terraform/tutorials/automation/github-actions | |
name: "Terraform Provisioning Prod Apply" | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "terraform/provisioning/prod/**" | |
- "terraform/provisioning/modules/**" | |
- ".github/workflows/terraform_provisioning_prod_apply.yaml" | |
workflow_dispatch: | |
env: | |
TF_CLOUD_ORGANIZATION: "devops-boot" | |
TF_API_TOKEN: "${{ secrets.TF_API_TOKEN }}" | |
TF_WORKSPACE: "provisioning-prod" | |
CONFIG_DIRECTORY: "./" | |
jobs: | |
terraform: | |
name: "Terraform Provisioning Prod Apply" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Upload Configuration | |
uses: hashicorp/tfc-workflows-github/actions/upload-configuration@v1.1.1 | |
id: apply-upload | |
with: | |
workspace: ${{ env.TF_WORKSPACE }} | |
directory: ${{ env.CONFIG_DIRECTORY }} | |
- name: Create Apply Run | |
uses: hashicorp/tfc-workflows-github/actions/create-run@v1.1.1 | |
id: apply-run | |
with: | |
workspace: ${{ env.TF_WORKSPACE }} | |
configuration_version: ${{ steps.apply-upload.outputs.configuration_version_id }} |