diff --git a/.github/actions/setup-tf/action.yaml b/.github/actions/setup-tf/action.yaml new file mode 100644 index 0000000000000..a4f66300960f8 --- /dev/null +++ b/.github/actions/setup-tf/action.yaml @@ -0,0 +1,11 @@ +name: "Setup Terraform" +description: | + Sets up Terraform for tests, builds, etc. +runs: + using: "composite" + steps: + - name: Install Terraform + uses: hashicorp/setup-terraform@v2 + with: + terraform_version: 1.5.2 + terraform_wrapper: false diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 93aa714793fbd..bfc11aede2267 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -240,11 +240,7 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-go - - - uses: hashicorp/setup-terraform@v2 - with: - terraform_version: 1.5.1 - terraform_wrapper: false + - uses: ./.github/actions/setup-tf - name: Test with Mock Database id: test @@ -305,11 +301,7 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-go - - - uses: hashicorp/setup-terraform@v2 - with: - terraform_version: 1.5.1 - terraform_wrapper: false + - uses: ./.github/actions/setup-tf - name: Test with PostgreSQL Database run: | @@ -349,11 +341,7 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-go - - - uses: hashicorp/setup-terraform@v2 - with: - terraform_version: 1.5.1 - terraform_wrapper: false + - uses: ./.github/actions/setup-tf - name: Run Tests run: | @@ -488,11 +476,7 @@ jobs: - uses: ./.github/actions/setup-node - uses: ./.github/actions/setup-go - - - uses: hashicorp/setup-terraform@v2 - with: - terraform_version: 1.5.1 - terraform_wrapper: false + - uses: ./.github/actions/setup-tf - name: Build run: | diff --git a/.github/workflows/nightly-gauntlet.yaml b/.github/workflows/nightly-gauntlet.yaml index 0f4c8fcb3bdcb..0cc00b0d7acf0 100644 --- a/.github/workflows/nightly-gauntlet.yaml +++ b/.github/workflows/nightly-gauntlet.yaml @@ -19,11 +19,7 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-go - - - uses: hashicorp/setup-terraform@v2 - with: - terraform_version: 1.1.9 - terraform_wrapper: false + - uses: ./.github/actions/setup-tf - name: Run Tests run: | diff --git a/scripts/Dockerfile.base b/scripts/Dockerfile.base index c24970ef2cac3..60785b6e5d797 100644 --- a/scripts/Dockerfile.base +++ b/scripts/Dockerfile.base @@ -13,11 +13,8 @@ RUN apk add --no-cache \ git \ 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 && \ + terraform=1.5.2-r0 && \ addgroup \ -g 1000 \ coder && \