Skip to content

Merge pull request #21 from RavenEsc/security-secrets #50

Merge pull request #21 from RavenEsc/security-secrets

Merge pull request #21 from RavenEsc/security-secrets #50

Workflow file for this run

name: "Terraform Apply"
on:
push:
branches:
- main
env:
TF_CLOUD_ORGANIZATION: "raven-for-aws"
TF_API_TOKEN: "${{ secrets.TF_API_TOKEN }}"
TF_WORKSPACE: "AWS_SAT"
CONFIG_DIRECTORY: "./tf/"
jobs:
terraform:
name: "Terraform Apply"
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: ${{ env.CONFIG_DIRECTORY }}
- name: Print Current Directory
run: "echo ::Current Directory: $PWD::"
# - name: Print Config Directory
# run: "echo ${{ env.CONFIG_DIRECTORY }}"
- name: Upload Configuration
uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: apply-upload
with:
workspace: ${{ env.TF_WORKSPACE }}
directory: ${{ env.CONFIG_DIRECTORY }}
- name: Create Apply Run
uses: hashicorp/tfc-workflows-github/actions/[email protected]
id: apply-run
with:
workspace: ${{ env.TF_WORKSPACE }}
configuration_version: ${{ steps.apply-upload.outputs.configuration_version_id }}
- name: Apply
uses: hashicorp/tfc-workflows-github/actions/[email protected]
if: fromJSON(steps.apply-run.outputs.payload).data.attributes.actions.IsConfirmable
id: apply
timeout-minutes: 15
with:
run: ${{ steps.apply-run.outputs.run_id }}
comment: "Apply Run from GitHub Actions CI ${{ github.sha }}"