Skip to content

Commit

Permalink
Install terraform for github actions that need it
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fantapop committed Jan 15, 2025
1 parent 272cdd8 commit abfdd63
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
go-version-file: 'go.mod'
cache: true

# We don't pin the version of terraform to ensure the tests run against
# the latest CLI version.
- name: Install terraform
uses: hashicorp/setup-terraform@v3

- name: Tests
run: make testacc
env:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ jobs:
with:
go-version: 1.22

# We don't pin the version of terraform to ensure the tests run against
# the latest CLI version.
- name: Install terraform
uses: hashicorp/setup-terraform@v3

- name: Tests
run: make test

Expand All @@ -72,6 +77,13 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4

# Terraform fmt is run on the docs directory, don't bother pinning this
# version. This will install the latest version. If there is a difference
# in format between the latest version and the local version, the
# developer should update.
- name: Install terraform
uses: hashicorp/setup-terraform@v3

- name: Build docs
run: make generate

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pre-release-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
with:
go-version: 1.22

# We don't pin the version of terraform to ensure the tests run against
# the latest CLI version.
- name: Install terraform
uses: hashicorp/setup-terraform@v3

- name: Tests
run: make testacc
env:
Expand Down

0 comments on commit abfdd63

Please sign in to comment.