Skip to content

Commit abfdd63

Browse files
committed
Install terraform for github actions that need it
The image in use for our ci actions, ubuntu-latest is now defaulting to ubuntu-24.04. In the previous version, terraform was installed by default but has now been removed so we install it manually for each job that relies on it. actions/runner-images#10636 We choose not to pin the version of terraform that is installed so we are always testing against the the latest CLI version. If there is a discrepancy between versions that only affects tests, developers can update to the latest version and ensure the tests work for that.
1 parent 272cdd8 commit abfdd63

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.github/workflows/acceptance-tests.yml

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ jobs:
1414
go-version-file: 'go.mod'
1515
cache: true
1616

17+
# We don't pin the version of terraform to ensure the tests run against
18+
# the latest CLI version.
19+
- name: Install terraform
20+
uses: hashicorp/setup-terraform@v3
21+
1722
- name: Tests
1823
run: make testacc
1924
env:

.github/workflows/ci.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ jobs:
4646
with:
4747
go-version: 1.22
4848

49+
# We don't pin the version of terraform to ensure the tests run against
50+
# the latest CLI version.
51+
- name: Install terraform
52+
uses: hashicorp/setup-terraform@v3
53+
4954
- name: Tests
5055
run: make test
5156

@@ -72,6 +77,13 @@ jobs:
7277
- name: Checkout sources
7378
uses: actions/checkout@v4
7479

80+
# Terraform fmt is run on the docs directory, don't bother pinning this
81+
# version. This will install the latest version. If there is a difference
82+
# in format between the latest version and the local version, the
83+
# developer should update.
84+
- name: Install terraform
85+
uses: hashicorp/setup-terraform@v3
86+
7587
- name: Build docs
7688
run: make generate
7789

.github/workflows/pre-release-ci.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
with:
2020
go-version: 1.22
2121

22+
# We don't pin the version of terraform to ensure the tests run against
23+
# the latest CLI version.
24+
- name: Install terraform
25+
uses: hashicorp/setup-terraform@v3
26+
2227
- name: Tests
2328
run: make testacc
2429
env:

0 commit comments

Comments
 (0)