From 1f973e282bb04413c010399ecc52d925714f48d5 Mon Sep 17 00:00:00 2001 From: Adrian Lai Date: Fri, 25 Mar 2022 19:29:41 +0000 Subject: [PATCH] Upgrade to terraform 1.x --- .github/actions/terratest/Dockerfile | 2 +- .github/workflows/ci.yml | 4 ++-- .terraform-version | 2 +- UPGRADING.md | 3 +++ modules/asg_node_group/versions.tf | 2 +- versions.tf | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/actions/terratest/Dockerfile b/.github/actions/terratest/Dockerfile index 2a61cbdb..a2c8705d 100644 --- a/.github/actions/terratest/Dockerfile +++ b/.github/actions/terratest/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.17.3-alpine3.13 WORKDIR / -ARG TERRAFORM_VERSION=0.14.11 +ARG TERRAFORM_VERSION=1.0.11 ARG KUBECTL_VERSION=1.20.5 ARG KUBECTL_SHA=7f9dbb80190945a5077dc5f4230202c22f68f9bd7f20c213c3cf5a74abf55e56 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aec1ae1f..95711b4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@main - uses: hashicorp/setup-terraform@v1 with: - terraform_version: 0.14.11 + terraform_version: 1.0.11 - name: 'Terraform Format' run: terraform fmt -check -recursive - name: 'Terraform Init cluster' @@ -73,4 +73,4 @@ jobs: - name: 'Terratest' uses: ./.github/actions/terratest with: - args: "-run TestTerraformAwsEksCluster" \ No newline at end of file + args: "-run TestTerraformAwsEksCluster" diff --git a/.terraform-version b/.terraform-version index ecf56ca4..59e9e604 100644 --- a/.terraform-version +++ b/.terraform-version @@ -1 +1 @@ -0.14.11 +1.0.11 diff --git a/UPGRADING.md b/UPGRADING.md index 00396932..b26b22a1 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -5,6 +5,9 @@ * Check the notes for the Kubernetes version you are upgrading to at https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html * After upgrading the terraform module, remember to follow the [roll nodes](docs/roll_nodes.md) procedure to roll out upgraded nodes to your cluster. +## 1.20 -> 1.21 + * [261](https://github.com/cookpad/terraform-aws-eks/issues/267/) 💥 Breaking Change. Modules now require terraform version >=1.0. + ## 1.19 -> 1.20 * [247](https://github.com/cookpad/terraform-aws-eks/pull/247) 💥 Breaking Change. The `k8s_version` variable has been removed. Use the correct version of the module for the k8s version you want to use. * [156](https://github.com/cookpad/terraform-aws-eks/issues/156) 💥 Breaking Change. The root module has been removed. Please refactor using the README as a guide. diff --git a/modules/asg_node_group/versions.tf b/modules/asg_node_group/versions.tf index e4fe9527..86cb5863 100644 --- a/modules/asg_node_group/versions.tf +++ b/modules/asg_node_group/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.14" + required_version = ">= 1.0" required_providers { aws = { diff --git a/versions.tf b/versions.tf index 5e4ce43a..7117131f 100644 --- a/versions.tf +++ b/versions.tf @@ -1,3 +1,3 @@ terraform { - required_version = ">= 0.14" + required_version = ">= 1.0" }