Compare commits

..

No commits in common. "main" and "v3.1.1" have entirely different histories.
main ... v3.1.1

25 changed files with 8139 additions and 10985 deletions

View file

@ -1,6 +0,0 @@
## 3.1.2 (2024-08-19)
NOTES:
* This release introduces no functional changes. It does however include dependency updates which address upstream CVEs. ([#430](https://github.com/hashicorp/setup-terraform/issues/430))

View file

@ -5,9 +5,6 @@ project {
copyright_year = 2020 copyright_year = 2020
header_ignore = [ header_ignore = [
# internal catalog metadata (prose)
"META.d/**/*.yaml",
# changie tooling configuration and CHANGELOG entries (prose) # changie tooling configuration and CHANGELOG entries (prose)
".changes/unreleased/*.yaml", ".changes/unreleased/*.yaml",
".changie.yaml", ".changie.yaml",

2
.github/CODEOWNERS vendored
View file

@ -1 +1 @@
* @hashicorp/terraform-core-plugins * @hashicorp/terraform-devex

View file

@ -4,14 +4,10 @@ updates:
directory: "/" directory: "/"
schedule: schedule:
interval: "weekly" interval: "weekly"
# Dependabot only updates hashicorp GHAs, external GHAs are managed by internal tooling (tsccr)
- package-ecosystem: "github-actions" - package-ecosystem: "github-actions"
directory: "/" directory: "/"
groups:
"github-actions":
patterns:
- "*" # Group all GitHub Actions dependencies together
schedule: schedule:
interval: "weekly" interval: "daily"
day: "monday" allow:
time: "09:00" - dependency-name: "hashicorp/*"
timezone: "Etc/UTC"

View file

@ -1,16 +0,0 @@
## Related Issue
Fixes # <!-- INSERT ISSUE NUMBER -->
## Description
In plain English, describe your approach to addressing the issue linked above. For example, if you made a particular design decision, let us know why you chose this path instead of another solution.
<!-- heimdall_github_prtemplate:grc-pci_dss-2024-01-05 -->
## Rollback Plan
- [ ] If a change needs to be reverted, we will roll out an update to the code within 7 days.
## Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

View file

@ -0,0 +1,40 @@
# Based on https://github.com/leonsteinhaeuser/project-beta-automations
name: "Add Issues/PRs to TF Provider DevEx team board"
on:
issues:
types: [opened, reopened]
pull_request_target:
# NOTE: The way content is added to project board is equivalent to an "upsert".
# Calling it multiple times will be idempotent.
#
# See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
# to see the reasoning behind using `pull_request_target` instead of `pull_request`
types: [opened, reopened, ready_for_review]
jobs:
add-content-to-project:
name: "Add Content to project"
runs-on: ubuntu-latest
steps:
- name: "Set Issue to 'Priority = Triage Next'"
uses: leonsteinhaeuser/project-beta-automations@939000fb1900c9fc4f7b5058a09d9f833ebc6859 # v2.2.1
if: github.event_name == 'issues'
with:
gh_token: ${{ secrets.TF_DEVEX_PROJECT_GITHUB_TOKEN }}
organization: "hashicorp"
project_id: 99 #< https://github.com/orgs/hashicorp/projects/99
resource_node_id: ${{ github.event.issue.node_id }}
operation_mode: custom_field
custom_field_values: '[{\"name\":\"Priority\",\"type\":\"single_select\",\"value\":\"Triage Next\"}]'
- name: "Set Pull Request to 'Priority = Triage Next'"
uses: leonsteinhaeuser/project-beta-automations@939000fb1900c9fc4f7b5058a09d9f833ebc6859 # v2.2.1
if: github.event_name == 'pull_request'
with:
gh_token: ${{ secrets.TF_DEVEX_PROJECT_GITHUB_TOKEN }}
organization: "hashicorp"
project_id: 99 #< https://github.com/orgs/hashicorp/projects/99
resource_node_id: ${{ github.event.pull_request.node_id }}
operation_mode: custom_field
custom_field_values: '[{\"name\":\"Priority\",\"type\":\"single_select\",\"value\":\"Triage Next\"}]'

View file

@ -15,8 +15,8 @@ jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: miniscruff/changie-action@5036dffa79ffc007110dc7f75eca7ef72780e147 # v2.1.0 - uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
with: with:
version: latest version: latest
args: batch patch --dry-run args: batch patch --dry-run

View file

@ -11,7 +11,7 @@ jobs:
copywrite: copywrite:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3 - uses: hashicorp/setup-copywrite@867a1a2a064a0626db322392806428f7dc59cb3e # v1.1.2
- run: copywrite headers --plan - run: copywrite headers --plan
- run: copywrite license --plan - run: copywrite license --plan

View file

@ -9,14 +9,14 @@ on:
jobs: jobs:
check-dist: check-dist:
name: Check dist/ directory name: Check dist/ directory
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@95d9656793415e47f574f7967f3850ea3bf5a7ed uses: actions/reusable-workflows/.github/workflows/check-dist.yml@a8533f184b279cfc1b2dd6a96ed2f097ccf81189
with: with:
node-version: 20.x node-version: 20.x
node-caching: npm node-caching: npm
test: test:
name: Test name: Test
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@95d9656793415e47f574f7967f3850ea3bf5a7ed uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@a8533f184b279cfc1b2dd6a96ed2f097ccf81189
with: with:
node-version: 20.x node-version: 20.x
node-caching: npm node-caching: npm

View file

@ -1,21 +0,0 @@
# DO NOT EDIT - This GitHub Workflow is managed by automation
# https://github.com/hashicorp/terraform-devex-repos
name: Issue Comment Triage
on:
issue_comment:
types: [created]
jobs:
issue_comment_triage:
runs-on: ubuntu-latest
env:
# issue_comment events are triggered by comments on issues and pull requests. Checking the
# value of github.event.issue.pull_request tells us whether the issue is an issue or is
# actually a pull request, allowing us to dynamically set the gh subcommand:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment-on-issues-only-or-pull-requests-only
COMMAND: ${{ github.event.issue.pull_request && 'pr' || 'issue' }}
GH_TOKEN: ${{ github.token }}
steps:
- name: 'Remove waiting-response on comment'
run: gh ${{ env.COMMAND }} edit ${{ github.event.issue.html_url }} --remove-label waiting-response

39
.github/workflows/jira-sync.yml vendored Normal file
View file

@ -0,0 +1,39 @@
on:
issues:
types: [closed, deleted, reopened]
pull_request_target:
types: [closed, reopened]
name: Jira Sync
jobs:
sync:
runs-on: ubuntu-latest
name: Jira sync
steps:
- name: Login
uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1
if: contains(github.event.pull_request.labels.*.name, 'tf-devex-triage') || contains(github.event.issue.labels.*.name, 'tf-devex-triage')
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Search for existing issue
id: search
if: contains(github.event.pull_request.labels.*.name, 'tf-devex-triage') || contains(github.event.issue.labels.*.name, 'tf-devex-triage')
uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2
with:
jql: 'project="TFECO" and "Team (R&D)[Labels]"="TF-DevEx" and description ~ "${{ github.event.issue.html_url || github.event.pull_request.html_url }}" and labels in (Github)'
- name: Close task
if: ( github.event.action == 'closed' || github.event.action == 'deleted' ) && steps.search.outputs.issue
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
with:
issue: ${{ steps.search.outputs.issue }}
transition: "Closed"
- name: Reopen task
if: github.event.action == 'reopened' && steps.search.outputs.issue
uses: atlassian/gajira-transition@38fc9cd61b03d6a53dd35fcccda172fe04b36de3 # v3.0.1
with:
issue: ${{ steps.search.outputs.issue }}
transition: "To Do"

View file

@ -1,22 +0,0 @@
# DO NOT EDIT - This GitHub Workflow is managed by automation
# https://github.com/hashicorp/terraform-devex-repos
name: 'Lock Threads'
on:
schedule:
- cron: '0 10 * * *'
jobs:
lock:
runs-on: ubuntu-latest
steps:
# NOTE: When TSCCR updates the GitHub action version, update the template workflow file to avoid drift:
# https://github.com/hashicorp/terraform-devex-repos/blob/main/modules/repo/workflows/lock.tftpl
- uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v6.0.0
with:
process-only: 'issues, prs'
github-token: ${{ github.token }}
issue-inactive-days: '30'
issue-lock-reason: resolved
pr-inactive-days: '30'
pr-lock-reason: resolved

View file

@ -33,19 +33,19 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with: with:
fetch-depth: 0 fetch-depth: 0
# Avoid persisting GITHUB_TOKEN credentials as they take priority over our service account PAT for `git push` operations # Avoid persisting GITHUB_TOKEN credentials as they take priority over our service account PAT for `git push` operations
# More details: https://github.com/actions/checkout/blob/b4626ce19ce1106186ddf9bb20e706842f11a7c3/adrs/0153-checkout-v2.md#persist-credentials # More details: https://github.com/actions/checkout/blob/b4626ce19ce1106186ddf9bb20e706842f11a7c3/adrs/0153-checkout-v2.md#persist-credentials
persist-credentials: false persist-credentials: false
- name: Batch changes - name: Batch changes
uses: miniscruff/changie-action@5036dffa79ffc007110dc7f75eca7ef72780e147 # v2.1.0 uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
with: with:
version: latest version: latest
args: batch ${{ needs.changelog-version.outputs.version }} args: batch ${{ needs.changelog-version.outputs.version }}
- name: Merge changes - name: Merge changes
uses: miniscruff/changie-action@5036dffa79ffc007110dc7f75eca7ef72780e147 # v2.1.0 uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
with: with:
version: latest version: latest
args: merge args: merge
@ -62,7 +62,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with: with:
fetch-depth: 0 fetch-depth: 0
# Default input is the SHA that initially triggered the workflow. As we created a new commit in the previous job, # Default input is the SHA that initially triggered the workflow. As we created a new commit in the previous job,
@ -73,7 +73,7 @@ jobs:
persist-credentials: false persist-credentials: false
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with: with:
node-version: 20 node-version: 20
- name: Update package version - name: Update package version
@ -91,7 +91,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with: with:
fetch-depth: 0 fetch-depth: 0
# Default input is the SHA that initially triggered the workflow. As we created a new commit in the previous job, # Default input is the SHA that initially triggered the workflow. As we created a new commit in the previous job,
@ -117,7 +117,7 @@ jobs:
permissions: permissions:
contents: write # Needed to create GitHub release contents: write # Needed to create GitHub release
steps: steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with: with:
ref: ${{ inputs.versionNumber }} ref: ${{ inputs.versionNumber }}
fetch-depth: 0 fetch-depth: 0

37
.github/workflows/send-to-jira.yml vendored Normal file
View file

@ -0,0 +1,37 @@
on:
issues:
types: [labeled]
name: Jira Sync
jobs:
sync:
runs-on: ubuntu-latest
name: Jira sync
steps:
- name: Login
uses: atlassian/gajira-login@45fd029b9f1d6d8926c6f04175aa80c0e42c9026 # v3.0.1
if: github.event.label.name == 'tf-devex-triage'
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Search for existing issue
id: search
if: github.event.label.name == 'tf-devex-triage'
uses: tomhjp/gh-action-jira-search@04700b457f317c3e341ce90da5a3ff4ce058f2fa # v0.2.2
with:
jql: 'project="TFECO" and "Team (R&D)[Labels]"="TF-DevEx" and description ~ "${{ github.event.issue.html_url || github.event.pull_request.html_url }}" and labels in (Github)'
- name: Create task in DevEx board
if: github.event.label.name == 'tf-devex-triage' && !steps.search.outputs.issue
uses: atlassian/gajira-create@59e177c4f6451399df5b4911c2211104f171e669 # v3.0.1
with:
project: TFECO
issuetype: "Task"
summary: "[GH] ${{ github.event.issue.title || github.event.pull_request.title }}"
description: "${{ github.event.issue.html_url || github.event.pull_request.html_url }} \n Synced by Github Actions, tagged by ${{ github.actor }}"
# customfield_10091 is Team (R&D)
fields: '{"customfield_10091": ["TF-DevEx"], "labels": ["Github"]}'

View file

@ -20,7 +20,7 @@ jobs:
terraform-versions: [0.11.14, latest] terraform-versions: [0.11.14, latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - ${{ matrix['terraform-versions'] }} - name: Setup Terraform - ${{ matrix['terraform-versions'] }}
uses: ./ uses: ./
@ -44,7 +44,7 @@ jobs:
terraform-versions: [0.11.14, latest] terraform-versions: [0.11.14, latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform (no wrapper) - ${{ matrix['terraform-versions'] }} - name: Setup Terraform (no wrapper) - ${{ matrix['terraform-versions'] }}
uses: ./ uses: ./
@ -69,7 +69,7 @@ jobs:
terraform-versions: [~0.12, 0.12.x, <0.13.0] terraform-versions: [~0.12, 0.12.x, <0.13.0]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - ${{ matrix['terraform-versions'] }} - name: Setup Terraform - ${{ matrix['terraform-versions'] }}
uses: ./ uses: ./
@ -88,7 +88,7 @@ jobs:
terraform-versions: [~0.12, 0.12.x, <0.13.0] terraform-versions: [~0.12, 0.12.x, <0.13.0]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform (no wrapper) - ${{ matrix['terraform-versions'] }} - name: Setup Terraform (no wrapper) - ${{ matrix['terraform-versions'] }}
uses: ./ uses: ./
@ -100,7 +100,7 @@ jobs:
run: terraform version | grep 'Terraform v0\.12' run: terraform version | grep 'Terraform v0\.12'
terraform-credentials-cloud: terraform-credentials-cloud:
name: 'HCP Terraform Credentials' name: 'Terraform Cloud Credentials'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
@ -109,7 +109,7 @@ jobs:
TF_CLOUD_API_TOKEN: 'XXXXXXXXXXXXXX.atlasv1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' TF_CLOUD_API_TOKEN: 'XXXXXXXXXXXXXX.atlasv1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./
@ -138,7 +138,7 @@ jobs:
TF_CLOUD_API_TOKEN: 'XXXXXXXXXXXXXX.atlasv1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' TF_CLOUD_API_TOKEN: 'XXXXXXXXXXXXXX.atlasv1.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./
@ -166,7 +166,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./
@ -189,7 +189,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./
@ -220,7 +220,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./
@ -257,7 +257,7 @@ jobs:
working-directory: ./.github/workflows/data/local working-directory: ./.github/workflows/data/local
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./
@ -287,7 +287,7 @@ jobs:
working-directory: ./.github/workflows/data/local working-directory: ./.github/workflows/data/local
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./
@ -316,7 +316,7 @@ jobs:
working-directory: ./.github/workflows/data/local working-directory: ./.github/workflows/data/local
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./
@ -349,7 +349,7 @@ jobs:
working-directory: ./.github/workflows/data/local working-directory: ./.github/workflows/data/local
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./
@ -383,7 +383,7 @@ jobs:
working-directory: ./.github/workflows/data/delay working-directory: ./.github/workflows/data/delay
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Terraform - name: Setup Terraform
uses: ./ uses: ./

View file

@ -1,9 +1,3 @@
## 3.1.2 (2024-08-19)
NOTES:
* This release introduces no functional changes. It does however include dependency updates which address upstream CVEs. ([#430](https://github.com/hashicorp/setup-terraform/issues/430))
## 3.1.1 (2024-05-07) ## 3.1.1 (2024-05-07)
BUG FIXES: BUG FIXES:

View file

@ -1,11 +0,0 @@
---
schema: 1.1
partition: tf-ecosystem
category: github-action
summary:
owner: team-tf-core-plugins
description: |
Sets up Terraform CLI in your GitHub Actions workflow.
visibility: public

View file

@ -1,6 +0,0 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
data_summary:
gdpr:
exempt: true

View file

@ -6,7 +6,7 @@
The `hashicorp/setup-terraform` action is a JavaScript action that sets up Terraform CLI in your GitHub Actions workflow by: The `hashicorp/setup-terraform` action is a JavaScript action that sets up Terraform CLI in your GitHub Actions workflow by:
- Downloading a specific version of Terraform CLI and adding it to the `PATH`. - Downloading a specific version of Terraform CLI and adding it to the `PATH`.
- Configuring the [Terraform CLI configuration file](https://www.terraform.io/docs/commands/cli-config.html) with a HCP Terraform/Terraform Enterprise hostname and API token. - Configuring the [Terraform CLI configuration file](https://www.terraform.io/docs/commands/cli-config.html) with a Terraform Cloud/Enterprise hostname and API token.
- Installing a wrapper script to wrap subsequent calls of the `terraform` binary and expose its STDOUT, STDERR, and exit code as outputs named `stdout`, `stderr`, and `exitcode` respectively. (This can be optionally skipped if subsequent steps in the same job do not need to access the results of Terraform commands.) - Installing a wrapper script to wrap subsequent calls of the `terraform` binary and expose its STDOUT, STDERR, and exit code as outputs named `stdout`, `stderr`, and `exitcode` respectively. (This can be optionally skipped if subsequent steps in the same job do not need to access the results of Terraform commands.)
After you've used the action, subsequent steps in the same job can run arbitrary Terraform commands using [the GitHub Actions `run` syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun). This allows most Terraform commands to work exactly like they do on your local command line. After you've used the action, subsequent steps in the same job can run arbitrary Terraform commands using [the GitHub Actions `run` syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun). This allows most Terraform commands to work exactly like they do on your local command line.
@ -31,7 +31,7 @@ steps:
terraform_version: "1.1.7" terraform_version: "1.1.7"
``` ```
Credentials for HCP Terraform ([app.terraform.io](https://app.terraform.io/)) can be configured: Credentials for Terraform Cloud ([app.terraform.io](https://app.terraform.io/)) can be configured:
```yaml ```yaml
steps: steps:
@ -100,7 +100,7 @@ steps:
- name: Terraform Init - name: Terraform Init
id: init id: init
run: terraform init -input=false run: terraform init
- name: Terraform Validate - name: Terraform Validate
id: validate id: validate
@ -108,7 +108,7 @@ steps:
- name: Terraform Plan - name: Terraform Plan
id: plan id: plan
run: terraform plan -no-color -input=false run: terraform plan -no-color
continue-on-error: true continue-on-error: true
- uses: actions/github-script@v7 - uses: actions/github-script@v7
@ -168,7 +168,7 @@ steps:
- name: Terraform Init - name: Terraform Init
id: init id: init
run: terraform init -input=false run: terraform init
- name: Terraform Validate - name: Terraform Validate
id: validate id: validate
@ -176,7 +176,7 @@ steps:
- name: Terraform Plan - name: Terraform Plan
id: plan id: plan
run: terraform plan -no-color -input=false run: terraform plan -no-color
continue-on-error: true continue-on-error: true
- uses: actions/github-script@v7 - uses: actions/github-script@v7
@ -242,9 +242,9 @@ steps:
The action supports the following inputs: The action supports the following inputs:
- `cli_config_credentials_hostname` - (optional) The hostname of a HCP Terraform/Terraform Enterprise instance to - `cli_config_credentials_hostname` - (optional) The hostname of a Terraform Cloud/Enterprise instance to
place within the credentials block of the Terraform CLI configuration file. Defaults to `app.terraform.io`. place within the credentials block of the Terraform CLI configuration file. Defaults to `app.terraform.io`.
- `cli_config_credentials_token` - (optional) The API token for a HCP Terraform/Terraform Enterprise instance to - `cli_config_credentials_token` - (optional) The API token for a Terraform Cloud/Enterprise instance to
place within the credentials block of the Terraform CLI configuration file. place within the credentials block of the Terraform CLI configuration file.
- `terraform_version` - (optional) The version of Terraform CLI to install. Instead of a full version string, - `terraform_version` - (optional) The version of Terraform CLI to install. Instead of a full version string,
you can also specify a constraint string (see [Semver Ranges](https://www.npmjs.com/package/semver#ranges) you can also specify a constraint string (see [Semver Ranges](https://www.npmjs.com/package/semver#ranges)

View file

@ -3,11 +3,11 @@ description: 'Sets up Terraform CLI in your GitHub Actions workflow.'
author: 'HashiCorp, Inc.' author: 'HashiCorp, Inc.'
inputs: inputs:
cli_config_credentials_hostname: cli_config_credentials_hostname:
description: 'The hostname of a HCP Terraform/Terraform Enterprise instance to place within the credentials block of the Terraform CLI configuration file. Defaults to `app.terraform.io`.' description: 'The hostname of a Terraform Cloud/Enterprise instance to place within the credentials block of the Terraform CLI configuration file. Defaults to `app.terraform.io`.'
default: 'app.terraform.io' default: 'app.terraform.io'
required: false required: false
cli_config_credentials_token: cli_config_credentials_token:
description: 'The API token for a HCP Terraform/Terraform Enterprise instance to place within the credentials block of the Terraform CLI configuration file.' description: 'The API token for a Terraform Cloud/Enterprise instance to place within the credentials block of the Terraform CLI configuration file.'
required: false required: false
terraform_version: terraform_version:
description: 'The version of Terraform CLI to install. Instead of full version string you can also specify constraint string starting with "<" (for example `<1.13.0`) to install the latest version satisfying the constraint. A value of `latest` will install the latest version of Terraform CLI. Defaults to `latest`.' description: 'The version of Terraform CLI to install. Instead of full version string you can also specify constraint string starting with "<" (for example `<1.13.0`) to install the latest version satisfying the constraint. A value of `latest` will install the latest version of Terraform CLI. Defaults to `latest`.'

9910
dist/index.js vendored

File diff suppressed because one or more lines are too long

2757
dist/index1.js vendored

File diff suppressed because one or more lines are too long

6138
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "setup-terraform", "name": "setup-terraform",
"version": "3.1.2", "version": "3.1.1",
"description": "Setup Terraform CLI for GitHub Actions", "description": "Setup Terraform CLI for GitHub Actions",
"license": "MPL-2.0", "license": "MPL-2.0",
"publisher": "hashicorp", "publisher": "hashicorp",
@ -18,18 +18,18 @@
"keywords": [], "keywords": [],
"author": "", "author": "",
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1", "@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/github": "^6.0.1", "@actions/github": "^6.0.0",
"@actions/io": "^2.0.0", "@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2", "@actions/tool-cache": "^2.0.1",
"@hashicorp/js-releases": "^1.7.5", "@hashicorp/js-releases": "^1.7.2",
"semver": "^7.7.3" "semver": "^7.6.0"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "^0.38.4", "@vercel/ncc": "^0.38.1",
"jest": "^30.2.0", "jest": "^29.7.0",
"nock": "^14.0.10", "nock": "^13.5.4",
"semistandard": "^17.0.0" "semistandard": "^17.0.0"
}, },
"semistandard": { "semistandard": {

View file

@ -31,6 +31,6 @@ describe('output-listener', () => {
listen(Buffer.from('third write')); listen(Buffer.from('third write'));
expect(mockWrite.mock.lastCall[0]).toStrictEqual(Buffer.from('third write')); expect(mockWrite.mock.lastCall[0]).toStrictEqual(Buffer.from('third write'));
expect(mockWrite).toHaveBeenCalledTimes(3); expect(mockWrite).toBeCalledTimes(3);
}); });
}); });