Skip to content

Bump hashicorp/aws from 6.10.0 to 6.30.0 in /terraform #6

Bump hashicorp/aws from 6.10.0 to 6.30.0 in /terraform

Bump hashicorp/aws from 6.10.0 to 6.30.0 in /terraform #6

---
name: Lock Terraform providers
on: # yamllint disable-line rule:truthy
# We use the default activity types for the pull_request event as specified here:
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
pull_request:
paths:
# Ensure the workflow is run if it has been changed.
- .github/workflows/lock-terraform-providers.yml
- terraform/.terraform.lock.hcl
# Set a default shell for any run steps. The `-Eueo pipefail` sets errtrace,
# nounset, errexit, and pipefail. The `-x` will print all commands as they are
# run. Please see the GitHub Actions documentation for more information:
# https://docs.github.com/en/actions/using-jobs/setting-default-values-for-jobs
defaults:
run:
shell: bash -Eueo pipefail -x {0}
jobs:
diagnostics:
name: Run diagnostics
# This job does not need any permissions
permissions: {}
runs-on: ubuntu-latest
steps:
# Note that a duplicate of this step must be added at the top of
# each job.
- name: Apply standard cisagov job preamble
uses: cisagov/action-job-preamble@v1
with:
check_github_status: "true"
# This functionality is poorly implemented and has been
# causing problems due to the MITM implementation hogging or
# leaking memory. As a result we disable it by default. If
# you want to temporarily enable it, simply set
# monitor_permissions equal to "true".
#
# TODO: Re-enable this functionality when practical. See
# cisagov/skeleton-generic#207 for more details.
monitor_permissions: "false"
output_workflow_context: "true"
# Use a variable to specify the permissions monitoring
# configuration. By default this will yield the
# configuration stored in the cisagov organization-level
# variable, but if you want to use a different configuration
# then simply:
# 1. Create a repository-level variable with the name
# ACTIONS_PERMISSIONS_CONFIG.
# 2. Set this new variable's value to the configuration you
# want to use for this repository.
#
# Note in particular that changing the permissions
# monitoring configuration *does not* require you to modify
# this workflow.
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
lock-providers:
# Prevent the workflow from running if the trigger was a previous workflow run that
# updated the lock file or if the run is from a fork.
if: >-
(github.actor != 'github-actions[bot]')
&& (github.event.pull_request.head.repo.full_name == github.repository)
needs:
- diagnostics
permissions:
# stefanzweifel/git-auto-commit-action needs this to commit changes
contents: write
runs-on: ubuntu-latest
steps:
- name: Apply standard cisagov job preamble
uses: cisagov/action-job-preamble@v1
with:
# This functionality is poorly implemented and has been
# causing problems due to the MITM implementation hogging or
# leaking memory. As a result we disable it by default. If
# you want to temporarily enable it, simply set
# monitor_permissions equal to "true".
#
# TODO: Re-enable this functionality when practical. See
# cisagov/skeleton-generic#207 for more details.
monitor_permissions: "false"
# Use a variable to specify the permissions monitoring
# configuration. By default this will yield the
# configuration stored in the cisagov organization-level
# variable, but if you want to use a different configuration
# then simply:
# 1. Create a repository-level variable with the name
# ACTIONS_PERMISSIONS_CONFIG.
# 2. Set this new variable's value to the configuration you
# want to use for this repository.
#
# Note in particular that changing the permissions
# monitoring configuration *does not* require you to modify
# this workflow.
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
- id: setup-env
uses: cisagov/setup-env-github-action@v1
- uses: actions/checkout@v6
with:
# Needed by stefanzweifel/git-auto-commit-action to support the pull_request
# trigger.
ref: ${{ github.head_ref }}
token: ${{ secrets.GHA_AUTO_COMMIT_TOKEN || github.token }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ steps.setup-env.outputs.terraform-version }}
- name: Initialize the Terraform configuration
run: terraform init -backend=false
working-directory: ./terraform
- name: Lock Terraform providers
run: >-
terraform providers lock
-platform=darwin_amd64
-platform=darwin_arm64
-platform=linux_amd64
-platform=linux_arm64
working-directory: ./terraform
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: Lock Terraform providers