Skip to content

Commit

Permalink
deploy-development.yml: re-attempt with tg action
Browse files Browse the repository at this point in the history
  • Loading branch information
digorgonzola committed Dec 13, 2023
1 parent 90cbf76 commit e91caef
Showing 1 changed file with 46 additions and 20 deletions.
66 changes: 46 additions & 20 deletions .github/workflows/deploy-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,37 +104,63 @@ jobs:
echo "$VARS_CONTEXT" | to_envs >> $GITHUB_ENV
echo "$SECRETS_CONTEXT" | to_envs >> $GITHUB_ENV
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ env.tf_version }}

- name: Setup Terragrunt
id: setup_terragrunt
run: |
wget https://github.com/gruntwork-io/terragrunt/releases/download/v${terragrunt_version}/terragrunt_linux_amd64 \
&& mv terragrunt_linux_amd64 terragrunt \
&& chmod +x terragrunt \
&& mv terragrunt /usr/local/bin/terragrunt
env:
terragrunt_version: ${{ env.tg_version }}
# - name: Setup Terraform
# uses: hashicorp/setup-terraform@v3
# with:
# terraform_version: ${{ env.tf_version }}
#
# - name: Setup Terragrunt
# id: setup_terragrunt
# run: |
# wget https://github.com/gruntwork-io/terragrunt/releases/download/v${terragrunt_version}/terragrunt_linux_amd64 \
# && mv terragrunt_linux_amd64 terragrunt \
# && chmod +x terragrunt \
# && mv terragrunt /usr/local/bin/terragrunt
# env:
# terragrunt_version: ${{ env.tg_version }}

- name: Terragrunt Plan
id: terragrunt_plan
run: terragrunt plan -out=tf.plan
working-directory: ${{ env.tg_dir }}
uses: gruntwork-io/terragrunt-action@v2
with:
tf_version: ${{ env.tf_version }}
tg_version: ${{ env.tg_version }}
tg_dir: ${{ env.tg_dir }}
tg_command: 'plan -out=tf.plan'
env:
TF_INPUT: 0
TF_IN_AUTOMATION: true
# get the image digest from the build job with optional override from vars context
TF_VAR_image: ${{ vars.IMAGE || needs.build_test_push.outputs.image_tag }}

# - name: Terragrunt Plan
# id: terragrunt_plan
# run: terragrunt plan -out=tf.plan
# working-directory: ${{ env.tg_dir }}
# env:
# TF_INPUT: 0
# TF_IN_AUTOMATION: true
# # get the image digest from the build job with optional override from vars context
# TF_VAR_image: ${{ vars.IMAGE || needs.build_test_push.outputs.image_tag }}

- name: Terragrunt Apply
id: terragrunt_apply
run: terragrunt apply -auto-approve tf.plan
working-directory: ${{ env.tg_dir }}
uses: gruntwork-io/terragrunt-action@v2
with:
tf_version: ${{ env.tf_version }}
tg_version: ${{ env.tg_version }}
tg_dir: ${{ env.tg_dir }}
tg_command: '--terragrunt-non-interactive --terragrunt-log-level info apply -auto-approve tf.plan'
env:
TF_INPUT: 0
TF_IN_AUTOMATION: true
# get the image digest from the build job with optional override from vars context
TF_VAR_image: ${{ vars.IMAGE || needs.build_test_push.outputs.image_tag }}

# - name: Terragrunt Apply
# id: terragrunt_apply
# run: terragrunt apply -auto-approve tf.plan
# working-directory: ${{ env.tg_dir }}
# env:
# TF_INPUT: 0
# TF_IN_AUTOMATION: true
# # get the image digest from the build job with optional override from vars context
# TF_VAR_image: ${{ vars.IMAGE || needs.build_test_push.outputs.image_tag }}

0 comments on commit e91caef

Please sign in to comment.