Skip to content

Commit 728e901

Browse files
coadlerjohnstcn
authored andcommitted
chore: upgrade terraform to 1.10.5 (#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 552c4cd commit 728e901

File tree

69 files changed

+1467
-655
lines changed

Some content is hidden

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

69 files changed

+1467
-655
lines changed

.github/actions/setup-tf/action.yaml

Lines changed: 1 addition & 1 deletion
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

docs/install/offline.md

Lines changed: 1 addition & 1 deletion
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 \

dogfood/contents/Dockerfile

Lines changed: 2 additions & 2 deletions
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 && \

install.sh

Lines changed: 1 addition & 1 deletion
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

provisioner/terraform/install.go

Lines changed: 2 additions & 2 deletions
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
)

provisioner/terraform/resources_test.go

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,75 @@ func TestConvertResources(t *testing.T) {
337337
Type: "coder_env",
338338
}},
339339
},
340+
"multiple-agents-multiple-monitors": {
341+
resources: []*proto.Resource{{
342+
Name: "dev",
343+
Type: "null_resource",
344+
Agents: []*proto.Agent{
345+
{
346+
Name: "dev1",
347+
OperatingSystem: "linux",
348+
Architecture: "amd64",
349+
Apps: []*proto.App{
350+
{
351+
Slug: "app1",
352+
DisplayName: "app1",
353+
// Subdomain defaults to false if unspecified.
354+
Subdomain: false,
355+
OpenIn: proto.AppOpenIn_SLIM_WINDOW,
356+
},
357+
{
358+
Slug: "app2",
359+
DisplayName: "app2",
360+
Subdomain: true,
361+
Healthcheck: &proto.Healthcheck{
362+
Url: "http://localhost:13337/healthz",
363+
Interval: 5,
364+
Threshold: 6,
365+
},
366+
OpenIn: proto.AppOpenIn_SLIM_WINDOW,
367+
},
368+
},
369+
Auth: &proto.Agent_Token{},
370+
ConnectionTimeoutSeconds: 120,
371+
DisplayApps: &displayApps,
372+
ResourcesMonitoring: &proto.ResourcesMonitoring{
373+
Memory: &proto.MemoryResourceMonitor{
374+
Enabled: true,
375+
Threshold: 80,
376+
},
377+
},
378+
},
379+
{
380+
Name: "dev2",
381+
OperatingSystem: "linux",
382+
Architecture: "amd64",
383+
Apps: []*proto.App{},
384+
Auth: &proto.Agent_Token{},
385+
ConnectionTimeoutSeconds: 120,
386+
DisplayApps: &displayApps,
387+
ResourcesMonitoring: &proto.ResourcesMonitoring{
388+
Memory: &proto.MemoryResourceMonitor{
389+
Enabled: true,
390+
Threshold: 99,
391+
},
392+
Volumes: []*proto.VolumeResourceMonitor{
393+
{
394+
Path: "/volume2",
395+
Enabled: false,
396+
Threshold: 50,
397+
},
398+
{
399+
Path: "/volume1",
400+
Enabled: true,
401+
Threshold: 80,
402+
},
403+
},
404+
},
405+
},
406+
},
407+
}},
408+
},
340409
"multiple-agents-multiple-scripts": {
341410
resources: []*proto.Resource{{
342411
Name: "dev1",

provisioner/terraform/testdata/calling-module/calling-module.tf

Lines changed: 1 addition & 1 deletion
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
}

provisioner/terraform/testdata/calling-module/calling-module.tfplan.json

Lines changed: 7 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/calling-module/calling-module.tfstate.json

Lines changed: 7 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

provisioner/terraform/testdata/chaining-resources/chaining-resources.tf

Lines changed: 1 addition & 1 deletion
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
}

provisioner/terraform/testdata/chaining-resources/chaining-resources.tfplan.json

Lines changed: 7 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)