Skip to content

Commit a777c26

Browse files
coadlerjohnstcn
andauthored
chore: upgrade terraform to 1.10.5 (coder#16519)
- Updates `terraform` to [v1.10.5](https://github.com/hashicorp/terraform/blob/v1.10.5/CHANGELOG.md#1105-january-22-2025) - Updates provider to >=2.0.0 in provider testdata fixtures - Fixes provider to required release version for resource monitors - Fixes missing leading / in volumes in resource monitor tests --------- Co-authored-by: Cian Johnston <cian@coder.com>
1 parent f66a59f commit a777c26

File tree

68 files changed

+282
-450
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+282
-450
lines changed

Diff for: .github/actions/setup-tf/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ runs:
77
- name: Install Terraform
88
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
99
with:
10-
terraform_version: 1.9.8
10+
terraform_version: 1.10.5
1111
terraform_wrapper: false

Diff for: docs/install/offline.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ RUN mkdir -p /opt/terraform
5454
# The below step is optional if you wish to keep the existing version.
5555
# See https://github.com/coder/coder/blob/main/provisioner/terraform/install.go#L23-L24
5656
# for supported Terraform versions.
57-
ARG TERRAFORM_VERSION=1.9.8
57+
ARG TERRAFORM_VERSION=1.10.5
5858
RUN apk update && \
5959
apk del terraform && \
6060
curl -LOs https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \

Diff for: dogfood/contents/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ RUN apt-get update --quiet && apt-get install --yes \
195195
# Configure FIPS-compliant policies
196196
update-crypto-policies --set FIPS
197197

198-
# NOTE: In scripts/Dockerfile.base we specifically install Terraform version 1.9.8.
198+
# NOTE: In scripts/Dockerfile.base we specifically install Terraform version 1.10.5.
199199
# Installing the same version here to match.
200-
RUN wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.9.8/terraform_1.9.8_linux_amd64.zip" && \
200+
RUN wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.10.5/terraform_1.10.5_linux_amd64.zip" && \
201201
unzip /tmp/terraform.zip -d /usr/local/bin && \
202202
rm -f /tmp/terraform.zip && \
203203
chmod +x /usr/local/bin/terraform && \

Diff for: install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ EOF
273273
main() {
274274
MAINLINE=1
275275
STABLE=0
276-
TERRAFORM_VERSION="1.9.8"
276+
TERRAFORM_VERSION="1.10.5"
277277

278278
if [ "${TRACE-}" ]; then
279279
set -x

Diff for: provisioner/terraform/install.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ var (
2020
// when Terraform is not available on the system.
2121
// NOTE: Keep this in sync with the version in scripts/Dockerfile.base.
2222
// NOTE: Keep this in sync with the version in install.sh.
23-
TerraformVersion = version.Must(version.NewVersion("1.9.8"))
23+
TerraformVersion = version.Must(version.NewVersion("1.10.5"))
2424

2525
minTerraformVersion = version.Must(version.NewVersion("1.1.0"))
26-
maxTerraformVersion = version.Must(version.NewVersion("1.9.9")) // use .9 to automatically allow patch releases
26+
maxTerraformVersion = version.Must(version.NewVersion("1.10.9")) // use .9 to automatically allow patch releases
2727

2828
terraformMinorVersionMismatch = xerrors.New("Terraform binary minor version mismatch.")
2929
)

Diff for: provisioner/terraform/resources_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,12 @@ func TestConvertResources(t *testing.T) {
407407
},
408408
Volumes: []*proto.VolumeResourceMonitor{
409409
{
410-
Path: "volume2",
410+
Path: "/volume2",
411411
Enabled: false,
412412
Threshold: 50,
413413
},
414414
{
415-
Path: "volume1",
415+
Path: "/volume1",
416416
Enabled: true,
417417
Threshold: 80,
418418
},

Diff for: provisioner/terraform/testdata/calling-module/calling-module.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
coder = {
44
source = "coder/coder"
5-
version = "0.22.0"
5+
version = ">=2.0.0"
66
}
77
}
88
}

Diff for: provisioner/terraform/testdata/calling-module/calling-module.tfplan.json

+3-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: provisioner/terraform/testdata/calling-module/calling-module.tfstate.json

+5-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: provisioner/terraform/testdata/chaining-resources/chaining-resources.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
coder = {
44
source = "coder/coder"
5-
version = "0.22.0"
5+
version = ">=2.0.0"
66
}
77
}
88
}

Diff for: provisioner/terraform/testdata/chaining-resources/chaining-resources.tfplan.json

+3-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: provisioner/terraform/testdata/chaining-resources/chaining-resources.tfstate.json

+5-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: provisioner/terraform/testdata/conflicting-resources/conflicting-resources.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
coder = {
44
source = "coder/coder"
5-
version = "0.22.0"
5+
version = ">=2.0.0"
66
}
77
}
88
}

Diff for: provisioner/terraform/testdata/conflicting-resources/conflicting-resources.tfplan.json

+3-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)