Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actions/secure-setup-terraform/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ inputs:
description: 'The terraform version to install'
default: '1.3.3'
required: false
terraform_lockfile_location:
description: 'Path to the directory containing the .terraform.lock.hcl file. This action will mark this file readonly to prevent terraform init calls from adding new providers.'
required: true

runs:
using: 'composite'
Expand Down Expand Up @@ -56,5 +59,8 @@ runs:
CHECKSUM=$(jq -r --arg version ${{ inputs.terraform_version }} '.versions[] | select(.version==$version and .arch=="amd64" and .os=="linux") | .binary_checksum' < terraform-checksums.json)
echo "${CHECKSUM} $(which terraform)" > terraform.sha256
shasum --algorithm 256 --check terraform.sha256
- name: 'lock-provider-file'
shell: 'bash'
run: 'chmod 444 ${{ inputs.terraform_lockfile_location }}/.terraform.lock.hcl'


1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
uses: 'abcxyz/[email protected]'
with:
terraform_version: '1.3.3'
terraform_lockfile_location: './terraform/modules'
## Use terraform normally
```

Expand Down