diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b10cb48..2024050 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,9 +14,8 @@ jobs: with: { go-version: 1.14 } - name: Install Terraform - run: | - curl -sL https://releases.hashicorp.com/terraform/0.12.21/terraform_0.12.21_linux_amd64.zip -o terraform.zip - sudo unzip terraform.zip -d /usr/bin && rm -f terraform.zip + uses: hashicorp/setup-terraform@v1 + with: { terraform_version: 0.14.7 } - name: Install Taskfile run: curl -sL https://taskfile.dev/install.sh | sh diff --git a/examples/basic/.terraform.lock.hcl b/examples/basic/.terraform.lock.hcl new file mode 100644 index 0000000..54f0edc --- /dev/null +++ b/examples/basic/.terraform.lock.hcl @@ -0,0 +1,21 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/aws" { + version = "3.30.0" + constraints = ">= 2.17.0" + hashes = [ + "h1:z9kdXY2A/+dIZrPy9hNlg/B5I/AuETQsp0jz9EgprIQ=", + "zh:01f562a6a31fe46a8ca74804f360e3452b26f71abc549ce1f0ab5a8af2484cdf", + "zh:25bacc5ed725051f0ab1f7d575e45c901e5b8e1d50da4156a31dda92b2b7e481", + "zh:349b79979d9169db614d8ebd1bc2e0caeb7a38dc816e261b8b2b4b5204615519", + "zh:5e41446acc54c6fc15e82c3fa14b72174b30eba81e0711ede297e5620c55a628", + "zh:68ad98f6d612bdc35a65d48950abc8e75c69decb49db28258ce8eeb5458586b7", + "zh:704603d65e8bac17d203b57c2db142c3134a91076e1b4a31c40f75eb3257dde8", + "zh:a362c700032b2db047d16007d52f28b3f216d32671b6b355d23bdaa082c66a4b", + "zh:bd197797b41268de3c93cad02b7c655dc0c4d8661abb37544ca049e6b1eccae6", + "zh:deb12ef0e3396a71d485977ddc14b695775f7937097ebf2b2f53ed348a4365e7", + "zh:ec8a7d0f02738f290107d39bf401d68ddce82a95cd9d998003f7e04b3a196411", + "zh:ffcc43b6c5e7f26c55e2a8c539d7370fca8042722400a3e06bdce4240bd7088a", + ] +} diff --git a/examples/basic/main.tf b/examples/basic/main.tf index 4465b81..dfa0113 100644 --- a/examples/basic/main.tf +++ b/examples/basic/main.tf @@ -1,10 +1,9 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 0.14" } provider "aws" { - version = ">= 2.17" - region = "${var.region}" + region = var.region } data "aws_vpc" "main" { diff --git a/examples/basic/versions.tf b/examples/basic/versions.tf new file mode 100644 index 0000000..95371b6 --- /dev/null +++ b/examples/basic/versions.tf @@ -0,0 +1,9 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 3.0" + } + } + required_version = ">= 0.14" +} diff --git a/examples/complete/.terraform.lock.hcl b/examples/complete/.terraform.lock.hcl new file mode 100644 index 0000000..368a29f --- /dev/null +++ b/examples/complete/.terraform.lock.hcl @@ -0,0 +1,38 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/hashicorp/aws" { + version = "3.30.0" + constraints = ">= 2.17.0" + hashes = [ + "h1:z9kdXY2A/+dIZrPy9hNlg/B5I/AuETQsp0jz9EgprIQ=", + "zh:01f562a6a31fe46a8ca74804f360e3452b26f71abc549ce1f0ab5a8af2484cdf", + "zh:25bacc5ed725051f0ab1f7d575e45c901e5b8e1d50da4156a31dda92b2b7e481", + "zh:349b79979d9169db614d8ebd1bc2e0caeb7a38dc816e261b8b2b4b5204615519", + "zh:5e41446acc54c6fc15e82c3fa14b72174b30eba81e0711ede297e5620c55a628", + "zh:68ad98f6d612bdc35a65d48950abc8e75c69decb49db28258ce8eeb5458586b7", + "zh:704603d65e8bac17d203b57c2db142c3134a91076e1b4a31c40f75eb3257dde8", + "zh:a362c700032b2db047d16007d52f28b3f216d32671b6b355d23bdaa082c66a4b", + "zh:bd197797b41268de3c93cad02b7c655dc0c4d8661abb37544ca049e6b1eccae6", + "zh:deb12ef0e3396a71d485977ddc14b695775f7937097ebf2b2f53ed348a4365e7", + "zh:ec8a7d0f02738f290107d39bf401d68ddce82a95cd9d998003f7e04b3a196411", + "zh:ffcc43b6c5e7f26c55e2a8c539d7370fca8042722400a3e06bdce4240bd7088a", + ] +} + +provider "registry.terraform.io/hashicorp/template" { + version = "2.2.0" + hashes = [ + "h1:94qn780bi1qjrbC3uQtjJh3Wkfwd5+tTtJHOb7KTg9w=", + "zh:01702196f0a0492ec07917db7aaa595843d8f171dc195f4c988d2ffca2a06386", + "zh:09aae3da826ba3d7df69efeb25d146a1de0d03e951d35019a0f80e4f58c89b53", + "zh:09ba83c0625b6fe0a954da6fbd0c355ac0b7f07f86c91a2a97849140fea49603", + "zh:0e3a6c8e16f17f19010accd0844187d524580d9fdb0731f675ffcf4afba03d16", + "zh:45f2c594b6f2f34ea663704cc72048b212fe7d16fb4cfd959365fa997228a776", + "zh:77ea3e5a0446784d77114b5e851c970a3dde1e08fa6de38210b8385d7605d451", + "zh:8a154388f3708e3df5a69122a23bdfaf760a523788a5081976b3d5616f7d30ae", + "zh:992843002f2db5a11e626b3fc23dc0c87ad3729b3b3cff08e32ffb3df97edbde", + "zh:ad906f4cebd3ec5e43d5cd6dc8f4c5c9cc3b33d2243c89c5fc18f97f7277b51d", + "zh:c979425ddb256511137ecd093e23283234da0154b7fa8b21c2687182d9aea8b2", + ] +} diff --git a/examples/complete/main.tf b/examples/complete/main.tf index a034fe3..1da0e0f 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -1,10 +1,9 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 0.14" } provider "aws" { - version = ">= 2.17" - region = "${var.region}" + region = var.region } data "aws_vpc" "main" { diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf new file mode 100644 index 0000000..7882101 --- /dev/null +++ b/examples/complete/versions.tf @@ -0,0 +1,12 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 3.0" + } + template = { + source = "hashicorp/template" + } + } + required_version = ">= 0.14" +} diff --git a/versions.tf b/versions.tf index ac97c6a..9d58500 100644 --- a/versions.tf +++ b/versions.tf @@ -1,4 +1,4 @@ terraform { - required_version = ">= 0.12" + required_version = ">= 0.14" }