Skip to content

chore(deps): update terraform github.com/cds-snc/terraform-modules to… #220

chore(deps): update terraform github.com/cds-snc/terraform-modules to…

chore(deps): update terraform github.com/cds-snc/terraform-modules to… #220

name: "Terragrunt apply central"
on:
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/workflows/terragrunt-apply-central.yml"
- "satellite_accounts"
- "terragrunt/aws/central_account/**"
- "terragrunt/env/central/**"
- "terragrunt/env/common/**"
- "terragrunt/env/terragrunt.hcl"
env:
AWS_REGION: ca-central-1
TERRAFORM_VERSION: 1.1.4
TERRAGRUNT_VERSION: 0.36.0
TF_INPUT: false
TF_VAR_cbs_principal_arn: ${{ secrets.CBS_PRINCIPAL_ARN }}
TF_VAR_cbs_principal_role_arn: ${{ secrets.CBS_PRINCIPAL_ROLE_ARN }}
TF_VAR_cbs_destination_event_bus_arn: ${{ secrets.CBS_DESTINATION_EVENT_BUS_ARN}}
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:
terragrunt-apply:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup terraform tools
uses: cds-snc/terraform-tools-setup@5a19984bcb888600ad646e0caf5c6f4d0a54c165 # v1.2.0
- uses: cds-snc/paths-filter@b316143212d841aed668b7b29240c719d603a9b9 # v2.10.4
id: filter
with:
filters: |
central_account:
- 'terragrunt/aws/central_account/**'
- 'terragrunt/env/central/central_account/**'
common:
- '.github/workflows/terragrunt-apply-central.yml'
- 'satellite_accounts'
- 'terragrunt/env/common/**'
- 'terragrunt/env/terragrunt.hcl'
- name: configure aws credentials using OIDC
uses: aws-actions/configure-aws-credentials@ffc08eae7350b1061d7de219e2135c75561fb680 # master
with:
role-to-assume: arn:aws:iam::871282759583:role/ConfigTerraformAdministratorRole
role-session-name: CBSGitHubActions
aws-region: "ca-central-1"
- name: Terragrunt apply central account
if: ${{ steps.filter.outputs.central_account == 'true' || steps.filter.outputs.common == 'true' }}
working-directory: "terragrunt/env/central/central_account"
run: terragrunt apply --terragrunt-non-interactive -auto-approve