Skip to content

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

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

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

name: "Terragrunt plan cloud asset inventory"
on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/cloud-asset-inventory-terragrunt-plan.yml"
- "terragrunt/*/cloud_asset_inventory/**"
- "terragrunt/*/common/**"
- "terragrunt/env/terragrunt.hcl"
env:
AWS_REGION: ca-central-1
CONFTEST_VERSION: 0.27.0
TERRAFORM_VERSION: 1.1.9
TERRAGRUNT_VERSION: 0.36.7
TF_INPUT: false
TF_VAR_customer_id: ${{ secrets.TF_VARS_LOG_ANALYTICS_CUSTOMER_ID }}
TF_VAR_shared_key: ${{ secrets.TF_VARS_LOG_ANALYTICS_SHARED_KEY }}
TF_VAR_cloudquery_api_key: ${{ secrets.TF_VARS_CLOUDQUERY_API_KEY }}
permissions:
id-token: write
contents: read
pull-requests: write
actions: write
checks: write
statuses: write
jobs:
terragrunt-plan:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Terraform tools
uses: cds-snc/terraform-tools-setup@v1
- uses: cds-snc/paths-filter@b316143212d841aed668b7b29240c719d603a9b9 # v2.10.4
id: filter
with:
filters: |
cloud_asset_inventory:
- 'terragrunt/aws/cloud_asset_inventory/**'
- 'terragrunt/env/cloud_asset_inventory/**'
common:
- '.github/workflows/cloud-asset-inventory-terragrunt-plan.yml'
- '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::${{ secrets.AWS_ACCOUNT }}:role/security-tools-plan
role-session-name: TFPlan
aws-region: ${{ env.AWS_REGION }}
- name: Get current date to determine if secrets need to be rotated
run: echo "TF_VAR_password_change_id=$(date +'%Y-%m')" >> $GITHUB_ENV
- name: Terragrunt plan cloud_asset_inventory
if: ${{ steps.filter.outputs.cloud_asset_inventory == 'true' || steps.filter.outputs.common == 'true' }}
uses: cds-snc/terraform-plan@4719878d72d1b0078e0bce2e7571e854e79903b8 # v3.2.2
with:
directory: "terragrunt/env/cloud_asset_inventory"
comment-delete: "true"
comment-title: "cloud_asset_inventory"
github-token: "${{ secrets.GITHUB_TOKEN }}"
terragrunt: "true"