mirror of https://github.com/coder/coder.git
chore: upgrade terraform to 1.5.1 (#8160)
This commit is contained in:
parent
8e2422d42c
commit
41e7216df7
|
@ -231,7 +231,7 @@ jobs:
|
|||
|
||||
- uses: hashicorp/setup-terraform@v2
|
||||
with:
|
||||
terraform_version: 1.1.9
|
||||
terraform_version: 1.5.1
|
||||
terraform_wrapper: false
|
||||
|
||||
- name: Test with Mock Database
|
||||
|
@ -296,7 +296,7 @@ jobs:
|
|||
|
||||
- uses: hashicorp/setup-terraform@v2
|
||||
with:
|
||||
terraform_version: 1.1.9
|
||||
terraform_version: 1.5.1
|
||||
terraform_wrapper: false
|
||||
|
||||
- name: Test with PostgreSQL Database
|
||||
|
@ -338,6 +338,11 @@ jobs:
|
|||
|
||||
- uses: ./.github/actions/setup-go
|
||||
|
||||
- uses: hashicorp/setup-terraform@v2
|
||||
with:
|
||||
terraform_version: 1.5.1
|
||||
terraform_wrapper: false
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
gotestsum --junitfile="gotests.xml" -- -race ./...
|
||||
|
@ -474,7 +479,7 @@ jobs:
|
|||
|
||||
- uses: hashicorp/setup-terraform@v2
|
||||
with:
|
||||
terraform_version: 1.1.9
|
||||
terraform_version: 1.5.1
|
||||
terraform_wrapper: false
|
||||
|
||||
- name: Build
|
||||
|
|
|
@ -22,7 +22,7 @@ var (
|
|||
TerraformVersion = version.Must(version.NewVersion("1.4.6"))
|
||||
|
||||
minTerraformVersion = version.Must(version.NewVersion("1.1.0"))
|
||||
maxTerraformVersion = version.Must(version.NewVersion("1.4.9"))
|
||||
maxTerraformVersion = version.Must(version.NewVersion("1.5.9")) // use .9 to automatically allow patch releases
|
||||
|
||||
terraformMinorVersionMismatch = xerrors.New("Terraform binary minor version mismatch.")
|
||||
)
|
||||
|
|
|
@ -20,7 +20,6 @@ import (
|
|||
|
||||
"cdr.dev/slog"
|
||||
"cdr.dev/slog/sloggers/slogtest"
|
||||
|
||||
"github.com/coder/coder/provisioner/terraform"
|
||||
"github.com/coder/coder/provisionersdk"
|
||||
"github.com/coder/coder/provisionersdk/proto"
|
||||
|
@ -284,7 +283,7 @@ func TestProvision(t *testing.T) {
|
|||
Files: map[string]string{
|
||||
"main.tf": `a`,
|
||||
},
|
||||
ErrorContains: "initialize terraform",
|
||||
ErrorContains: "plan terraform",
|
||||
ExpectLogContains: "Argument or block definition required",
|
||||
},
|
||||
{
|
||||
|
@ -292,7 +291,7 @@ func TestProvision(t *testing.T) {
|
|||
Files: map[string]string{
|
||||
"main.tf": `;asdf;`,
|
||||
},
|
||||
ErrorContains: "initialize terraform",
|
||||
ErrorContains: "plan terraform",
|
||||
ExpectLogContains: `The ";" character is not valid.`,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# This is the base image used for Coder images. It's a multi-arch image that is
|
||||
# built in depot.dev for all supported architectures. Since it's built on real
|
||||
# hardware and not cross-compiled, it can have "RUN" commands.
|
||||
FROM alpine:3.18
|
||||
FROM alpine:3.18.2
|
||||
|
||||
# We use a single RUN command to reduce the number of layers in the image.
|
||||
# NOTE: Keep the Terraform version in sync with minTerraformVersion and
|
||||
|
@ -11,9 +11,13 @@ RUN apk add --no-cache \
|
|||
wget \
|
||||
bash \
|
||||
git \
|
||||
openssl>=3.1.1-r1 \
|
||||
openssh-client \
|
||||
terraform=1.4.6-r1 && \
|
||||
openssh-client && \
|
||||
# Use the edge repo, since Terraform doesn't seem to be backported to 3.18.
|
||||
# TODO: remove =~
|
||||
# For some reason alpine's ARM builders are offline, so ARM builds will have
|
||||
# to fall back to 1.5.0.
|
||||
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
|
||||
terraform=~1.5-r0 && \
|
||||
addgroup \
|
||||
-g 1000 \
|
||||
coder && \
|
||||
|
|
Loading…
Reference in New Issue