Skip to content

chore(deps): update all patch dependencies #369

chore(deps): update all patch dependencies

chore(deps): update all patch dependencies #369

name: "Terragrunt plan satellite"
on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/terragrunt-plan-satellite.yml"
- "satellite_accounts"
- "terragrunt/aws/satellite_bucket/**"
- "terragrunt/env/common/**"
- "terragrunt/env/satellite/**"
- "terragrunt/env/terragrunt.hcl"
env:
AWS_REGION: ca-central-1
CONFTEST_VERSION: 0.27.0
TERRAFORM_VERSION: 1.1.4
TERRAGRUNT_VERSION: 0.36.0
TF_INPUT: false
TF_VAR_slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_CBS }}
permissions:
id-token: write
contents: read
pull-requests: write
actions: write
checks: write
statuses: write
jobs:
retrieve-accounts:
uses: cds-snc/cloud-based-sensor/.github/workflows/retrieve-accounts.yml@main
terragrunt-plan:
needs: retrieve-accounts
strategy:
fail-fast: false
matrix: ${{fromJson(needs.retrieve-accounts.outputs.matrix)}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup terraform tools
uses: cds-snc/terraform-tools-setup@cc15ce9039f6c37c592fb9930b70466b229d2e9b # tag=v1
- uses: cds-snc/paths-filter@b316143212d841aed668b7b29240c719d603a9b9 # v2.10.4
id: filter
with:
filters: |
satellite_bucket:
- 'terragrunt/aws/satellite_bucket/**'
- 'terragrunt/env/satellite/satellite_bucket/**'
common:
- '.github/workflows/terragrunt-plan-satellite.yml'
- 'satellite_accounts'
- 'terragrunt/env/common/**'
- 'terragrunt/env/terragrunt.hcl'
- name: configure aws credentials using OIDC
uses: aws-actions/configure-aws-credentials@master
with:
role-to-assume: arn:aws:iam::871282759583:role/ConfigTerraformAdministratorRole
role-session-name: CBSGitHubActions
aws-region: "ca-central-1"
- name: Set the Terragrunt IAM role
run: |
echo "TERRAGRUNT_IAM_ROLE=arn:aws:iam::${{ matrix.account }}:role/ConfigTerraformAdminExecutionRole" >> $GITHUB_ENV
echo "TERRAGRUNT_IAM_ASSUME_ROLE_SESSION_NAME=CBSGitHubActions" >> $GITHUB_ENV
- name: Terragrunt plan satellite bucket
if: ${{ steps.filter.outputs.satellite_bucket == 'true' || steps.filter.outputs.common == 'true' }}
uses: cds-snc/terraform-plan@4719878d72d1b0078e0bce2e7571e854e79903b8 # v3.2.2
with:
directory: "terragrunt/env/satellite/satellite_bucket"
comment-delete: "true"
comment-title: "${{ matrix.account }}: Satellite bucket"
github-token: "${{ secrets.GITHUB_TOKEN }}"
terragrunt: "true"