From 20dc2c87a5c48d33c33d3a6477a53577090032a8 Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Fri, 16 Oct 2020 22:12:56 +0200 Subject: [PATCH] feat: Added support for Terraform 0.14 (#525) --- .gitignore | 2 + .tflint.hcl | 57 ------------------- README.md | 6 +- examples/complete-vpc/README.md | 6 +- examples/complete-vpc/versions.tf | 4 +- examples/ipv6/README.md | 6 +- examples/ipv6/versions.tf | 4 +- .../issue-108-route-already-exists/README.md | 4 +- .../versions.tf | 4 +- .../README.md | 4 +- .../versions.tf | 4 +- .../issue-46-no-private-subnets/README.md | 4 +- .../issue-46-no-private-subnets/versions.tf | 4 +- examples/manage-default-vpc/README.md | 4 +- examples/manage-default-vpc/versions.tf | 4 +- examples/network-acls/README.md | 4 +- examples/network-acls/versions.tf | 4 +- examples/secondary-cidr-blocks/README.md | 4 +- examples/secondary-cidr-blocks/versions.tf | 4 +- examples/simple-vpc/README.md | 4 +- examples/simple-vpc/versions.tf | 4 +- examples/vpc-flow-logs/README.md | 6 +- examples/vpc-flow-logs/versions.tf | 4 +- .../README.md | 4 +- .../versions.tf | 4 +- main.tf | 6 -- versions.tf | 4 +- 27 files changed, 54 insertions(+), 115 deletions(-) delete mode 100644 .tflint.hcl diff --git a/.gitignore b/.gitignore index 4fa2920dd..64ba6a76c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ terraform.tfstate *.tfstate* terraform.tfvars + +.terraform.lock.hcl diff --git a/.tflint.hcl b/.tflint.hcl deleted file mode 100644 index 9ea79da1d..000000000 --- a/.tflint.hcl +++ /dev/null @@ -1,57 +0,0 @@ -config { - deep_check = false - ignore_module = {} - varfile = [] -} - -rule "terraform_deprecated_interpolation" { - enabled = true -} - -rule "terraform_deprecated_index" { - enabled = true -} - -rule "terraform_unused_declarations" { - enabled = true -} - -rule "terraform_comment_syntax" { - enabled = true -} - -rule "terraform_documented_outputs" { - enabled = true -} - -rule "terraform_documented_variables" { - enabled = true -} - -rule "terraform_typed_variables" { - enabled = true -} - -rule "terraform_module_pinned_source" { - enabled = true -} - -rule "terraform_naming_convention" { - enabled = true -} - -rule "terraform_required_version" { - enabled = true -} - -rule "terraform_required_providers" { - enabled = true -} - -rule "terraform_standard_module_structure" { - enabled = true -} - -rule "terraform_workspace_remote" { - enabled = true -} diff --git a/README.md b/README.md index b5fa4c9c8..c133158e7 100644 --- a/README.md +++ b/README.md @@ -224,14 +224,14 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers | Name | Version | |------|---------| -| aws | >= 2.68, < 4.0 | +| aws | >= 2.68 | ## Inputs diff --git a/examples/complete-vpc/README.md b/examples/complete-vpc/README.md index 2afe52299..b5dd47274 100644 --- a/examples/complete-vpc/README.md +++ b/examples/complete-vpc/README.md @@ -21,14 +21,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers | Name | Version | |------|---------| -| aws | >= 2.68, < 4.0 | +| aws | >= 2.68 | ## Inputs diff --git a/examples/complete-vpc/versions.tf b/examples/complete-vpc/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/complete-vpc/versions.tf +++ b/examples/complete-vpc/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/examples/ipv6/README.md b/examples/ipv6/README.md index 8e7237bfa..8889b690a 100644 --- a/examples/ipv6/README.md +++ b/examples/ipv6/README.md @@ -19,14 +19,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers | Name | Version | |------|---------| -| aws | >= 2.68, < 4.0 | +| aws | >= 2.68 | ## Inputs diff --git a/examples/ipv6/versions.tf b/examples/ipv6/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/ipv6/versions.tf +++ b/examples/ipv6/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/examples/issue-108-route-already-exists/README.md b/examples/issue-108-route-already-exists/README.md index 0834f2fd2..1e154b3c3 100644 --- a/examples/issue-108-route-already-exists/README.md +++ b/examples/issue-108-route-already-exists/README.md @@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers diff --git a/examples/issue-108-route-already-exists/versions.tf b/examples/issue-108-route-already-exists/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/issue-108-route-already-exists/versions.tf +++ b/examples/issue-108-route-already-exists/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/examples/issue-44-asymmetric-private-subnets/README.md b/examples/issue-44-asymmetric-private-subnets/README.md index f282aeb5d..64d57b760 100644 --- a/examples/issue-44-asymmetric-private-subnets/README.md +++ b/examples/issue-44-asymmetric-private-subnets/README.md @@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers diff --git a/examples/issue-44-asymmetric-private-subnets/versions.tf b/examples/issue-44-asymmetric-private-subnets/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/issue-44-asymmetric-private-subnets/versions.tf +++ b/examples/issue-44-asymmetric-private-subnets/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/examples/issue-46-no-private-subnets/README.md b/examples/issue-46-no-private-subnets/README.md index 1a5408471..78a7118e8 100644 --- a/examples/issue-46-no-private-subnets/README.md +++ b/examples/issue-46-no-private-subnets/README.md @@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers diff --git a/examples/issue-46-no-private-subnets/versions.tf b/examples/issue-46-no-private-subnets/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/issue-46-no-private-subnets/versions.tf +++ b/examples/issue-46-no-private-subnets/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/examples/manage-default-vpc/README.md b/examples/manage-default-vpc/README.md index c559901d3..0fae2dd8d 100644 --- a/examples/manage-default-vpc/README.md +++ b/examples/manage-default-vpc/README.md @@ -21,8 +21,8 @@ Run `terraform destroy` when you don't need these resources. | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers diff --git a/examples/manage-default-vpc/versions.tf b/examples/manage-default-vpc/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/manage-default-vpc/versions.tf +++ b/examples/manage-default-vpc/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/examples/network-acls/README.md b/examples/network-acls/README.md index 01204db06..35f420169 100644 --- a/examples/network-acls/README.md +++ b/examples/network-acls/README.md @@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers diff --git a/examples/network-acls/versions.tf b/examples/network-acls/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/network-acls/versions.tf +++ b/examples/network-acls/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/examples/secondary-cidr-blocks/README.md b/examples/secondary-cidr-blocks/README.md index b8ad1a61d..7305b6767 100644 --- a/examples/secondary-cidr-blocks/README.md +++ b/examples/secondary-cidr-blocks/README.md @@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers diff --git a/examples/secondary-cidr-blocks/versions.tf b/examples/secondary-cidr-blocks/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/secondary-cidr-blocks/versions.tf +++ b/examples/secondary-cidr-blocks/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/examples/simple-vpc/README.md b/examples/simple-vpc/README.md index 91ac840ef..8ec386ba9 100644 --- a/examples/simple-vpc/README.md +++ b/examples/simple-vpc/README.md @@ -25,8 +25,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers diff --git a/examples/simple-vpc/versions.tf b/examples/simple-vpc/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/simple-vpc/versions.tf +++ b/examples/simple-vpc/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/examples/vpc-flow-logs/README.md b/examples/vpc-flow-logs/README.md index 47df9926b..74d8655b4 100644 --- a/examples/vpc-flow-logs/README.md +++ b/examples/vpc-flow-logs/README.md @@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | | random | >= 2 | ## Providers | Name | Version | |------|---------| -| aws | >= 2.68, < 4.0 | +| aws | >= 2.68 | | random | >= 2 | ## Inputs diff --git a/examples/vpc-flow-logs/versions.tf b/examples/vpc-flow-logs/versions.tf index 27fc5c58c..3d4b1a187 100644 --- a/examples/vpc-flow-logs/versions.tf +++ b/examples/vpc-flow-logs/versions.tf @@ -1,8 +1,8 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" random = ">= 2" } } diff --git a/examples/vpc-separate-private-route-tables/README.md b/examples/vpc-separate-private-route-tables/README.md index 88938f2d6..0d8ef6ede 100644 --- a/examples/vpc-separate-private-route-tables/README.md +++ b/examples/vpc-separate-private-route-tables/README.md @@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP | Name | Version | |------|---------| -| terraform | >= 0.12.7, < 0.14 | -| aws | >= 2.68, < 4.0 | +| terraform | >= 0.12.7 | +| aws | >= 2.68 | ## Providers diff --git a/examples/vpc-separate-private-route-tables/versions.tf b/examples/vpc-separate-private-route-tables/versions.tf index 178df14b8..85a2050d0 100644 --- a/examples/vpc-separate-private-route-tables/versions.tf +++ b/examples/vpc-separate-private-route-tables/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } } diff --git a/main.tf b/main.tf index 85ba280d5..fa3e05cd3 100644 --- a/main.tf +++ b/main.tf @@ -217,12 +217,6 @@ resource "aws_route_table" "private" { var.tags, var.private_route_table_tags, ) - - lifecycle { - # When attaching VPN gateways it is common to define aws_vpn_gateway_route_propagation - # resources that manipulate the attributes of the routing table (typically for the private subnets) - ignore_changes = [propagating_vgws] - } } ################# diff --git a/versions.tf b/versions.tf index 178df14b8..85a2050d0 100644 --- a/versions.tf +++ b/versions.tf @@ -1,7 +1,7 @@ terraform { - required_version = ">= 0.12.7, < 0.14" + required_version = ">= 0.12.7" required_providers { - aws = ">= 2.68, < 4.0" + aws = ">= 2.68" } }