Skip to content

Commit

Permalink
Merge pull request #343 from signalwire/tofu
Browse files Browse the repository at this point in the history
Tofu support
  • Loading branch information
lucasmellos authored Dec 18, 2024
2 parents 7576ee3 + af17e39 commit 61ced41
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/iac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
TF_VERSION:
required: false
type: string
default: '1.5.7'
default: '1.8.7'
AWS_REGION:
required: true
type: string
Expand Down Expand Up @@ -191,14 +191,12 @@ jobs:
echo VAULT_TOKEN=$VAULT_TOKEN >> $GITHUB_ENV
env:
VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }}

- uses: opentofu/setup-opentofu@main

- name: Init
id: init
uses: gruntwork-io/terragrunt-action@v1
uses: gruntwork-io/terragrunt-action@v2.1.4
with:
tf_version: ${{ inputs.TF_VERSION }}
tofu_version: ${{ inputs.TF_VERSION }}
tg_version: ${{ inputs.TG_VERSION }}
tg_dir: ./${{ inputs.WORKING_DIR }}
tg_command: 'run-all init'
Expand All @@ -211,22 +209,22 @@ jobs:
git config --global --list
- name: Validate
uses: gruntwork-io/terragrunt-action@v1
uses: gruntwork-io/terragrunt-action@v2.1.4
id: validate
with:
tf_version: ${{ inputs.TF_VERSION }}
tofu_version: ${{ inputs.TF_VERSION }}
tg_version: ${{ inputs.TG_VERSION }}
tg_dir: ${{ inputs.WORKING_DIR }}
tg_command: 'run-all validate'
env:
OVH_CLOUD_PROJECT_SERVICE: ${{ secrets.OVH_CLOUD_PROJECT_SERVICE }}

- name: Plan
uses: gruntwork-io/terragrunt-action@v1
uses: gruntwork-io/terragrunt-action@v2.1.4
id: plan
continue-on-error: true
with:
tf_version: ${{ inputs.TF_VERSION }}
tofu_version: ${{ inputs.TF_VERSION }}
tg_version: ${{ inputs.TG_VERSION }}
tg_dir: ${{ inputs.WORKING_DIR }}
tg_command: 'run-all plan'
Expand Down Expand Up @@ -269,10 +267,10 @@ jobs:

- name: Apply
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: gruntwork-io/terragrunt-action@v1
uses: gruntwork-io/terragrunt-action@v2.1.4
id: apply
with:
tf_version: ${{ inputs.TF_VERSION }}
tofu_version: ${{ inputs.TF_VERSION }}
tg_version: ${{ inputs.TG_VERSION }}
tg_dir: ${{ inputs.WORKING_DIR }}
tg_command: 'run-all apply'
Expand Down

0 comments on commit 61ced41

Please sign in to comment.