From 41ed9608a28f908e2b6be74b2c22a7d253ce4ebd Mon Sep 17 00:00:00 2001 From: Awais Malik Date: Fri, 6 Oct 2023 16:15:46 -0700 Subject: [PATCH 01/14] chore: upgraded versions.tf to include minor bumps from tpg v5 --- examples/nat_with_compute_engine/versions.tf | 2 +- examples/nat_with_gke/versions.tf | 2 +- test/setup/versions.tf | 4 ++-- versions.tf | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/nat_with_compute_engine/versions.tf b/examples/nat_with_compute_engine/versions.tf index 9ce0f80..1f44ac4 100644 --- a/examples/nat_with_compute_engine/versions.tf +++ b/examples/nat_with_compute_engine/versions.tf @@ -18,7 +18,7 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = ">= 3.0, < 5.0" + version = ">= 3.0, < 6" } } required_version = ">= 0.13" diff --git a/examples/nat_with_gke/versions.tf b/examples/nat_with_gke/versions.tf index 9ce0f80..1f44ac4 100644 --- a/examples/nat_with_gke/versions.tf +++ b/examples/nat_with_gke/versions.tf @@ -18,7 +18,7 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = ">= 3.0, < 5.0" + version = ">= 3.0, < 6" } } required_version = ">= 0.13" diff --git a/test/setup/versions.tf b/test/setup/versions.tf index a8963c9..af0c8f1 100644 --- a/test/setup/versions.tf +++ b/test/setup/versions.tf @@ -19,11 +19,11 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = ">= 3.53, < 5.0" + version = ">= 3.53, < 6" } google-beta = { source = "hashicorp/google-beta" - version = ">= 3.53, < 5.0" + version = ">= 3.53, < 6" } } } diff --git a/versions.tf b/versions.tf index 2ef3dfc..6ab31d9 100644 --- a/versions.tf +++ b/versions.tf @@ -20,7 +20,7 @@ terraform { google = { source = "hashicorp/google" - version = ">= 4.51, < 5.0" + version = ">= 4.51, < 6" } random = { From d69539b687905aa90aa6e667b5fa410f3f7396cf Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 14:29:43 -0700 Subject: [PATCH 02/14] Delete examples/advanced/versions.tf --- examples/advanced/versions.tf | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 examples/advanced/versions.tf diff --git a/examples/advanced/versions.tf b/examples/advanced/versions.tf deleted file mode 100644 index 37a1c11..0000000 --- a/examples/advanced/versions.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -terraform { - required_providers { - google = { - source = "hashicorp/google" - version = "~> 4.0" - } - } - required_version = ">= 0.13" -} From b60f1892394ed3cde88c3a433b3d8bdea11d326b Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 14:29:52 -0700 Subject: [PATCH 03/14] Delete examples/basic/versions.tf --- examples/basic/versions.tf | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 examples/basic/versions.tf diff --git a/examples/basic/versions.tf b/examples/basic/versions.tf deleted file mode 100644 index 37a1c11..0000000 --- a/examples/basic/versions.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -terraform { - required_providers { - google = { - source = "hashicorp/google" - version = "~> 4.0" - } - } - required_version = ">= 0.13" -} From 36ce9af9c7b4721c8e41ee910b8d0a51959fbe8e Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 14:30:01 -0700 Subject: [PATCH 04/14] Delete examples/nat_with_compute_engine/versions.tf --- examples/nat_with_compute_engine/versions.tf | 25 -------------------- 1 file changed, 25 deletions(-) delete mode 100644 examples/nat_with_compute_engine/versions.tf diff --git a/examples/nat_with_compute_engine/versions.tf b/examples/nat_with_compute_engine/versions.tf deleted file mode 100644 index 1f44ac4..0000000 --- a/examples/nat_with_compute_engine/versions.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -terraform { - required_providers { - google = { - source = "hashicorp/google" - version = ">= 3.0, < 6" - } - } - required_version = ">= 0.13" -} From b112138c934b498d650ae0bcdb7c491b3b865896 Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 14:30:08 -0700 Subject: [PATCH 05/14] Delete examples/nat_with_gke/versions.tf --- examples/nat_with_gke/versions.tf | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 examples/nat_with_gke/versions.tf diff --git a/examples/nat_with_gke/versions.tf b/examples/nat_with_gke/versions.tf deleted file mode 100644 index 1f44ac4..0000000 --- a/examples/nat_with_gke/versions.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright 2021 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -terraform { - required_providers { - google = { - source = "hashicorp/google" - version = ">= 3.0, < 6" - } - } - required_version = ">= 0.13" -} From a16342399014b80bc0a30b8e3ccf1c06e7a359ed Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 14:30:23 -0700 Subject: [PATCH 06/14] Update versions.tf --- test/setup/versions.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/setup/versions.tf b/test/setup/versions.tf index af0c8f1..42f9257 100644 --- a/test/setup/versions.tf +++ b/test/setup/versions.tf @@ -19,11 +19,11 @@ terraform { required_providers { google = { source = "hashicorp/google" - version = ">= 3.53, < 6" + version = ">= 3.53" } google-beta = { source = "hashicorp/google-beta" - version = ">= 3.53, < 6" + version = ">= 3.53" } } } From c0463fc4c6972cd6725258981014e89213907d1c Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 15:19:28 -0700 Subject: [PATCH 07/14] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64fe045..63795a7 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ There are multiple examples included in the [examples](./examples/) folder but s ```hcl module "cloud-nat" { source = "terraform-google-modules/cloud-nat/google" - version = "~> 1.2" + version = "~> 4.1" project_id = var.project_id region = var.region router = google_compute_router.router.name @@ -86,7 +86,7 @@ Before this module can be used on a project, you must ensure that the following ### Terraform plugins - [Terraform](https://www.terraform.io/downloads.html) >= 0.13.0 -- [terraform-provider-google](https://github.com/terraform-providers/terraform-provider-google) plugin v4.27.0 +- [terraform-provider-google](https://github.com/terraform-providers/terraform-provider-google) plugin v4.51.0 ### Configure a Service Account From b4e7c74353363987207ad19fe424ba081e7d726b Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 15:23:16 -0700 Subject: [PATCH 08/14] Update variables.tf --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index cdef2a4..faa47d4 100644 --- a/variables.tf +++ b/variables.tf @@ -143,5 +143,5 @@ variable "enable_dynamic_port_allocation" { variable "enable_endpoint_independent_mapping" { type = bool description = "Specifies if endpoint independent mapping is enabled." - default = null + default = false } From decdb2f625569eb21c69ad652653d1d3195f4c54 Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 15:26:57 -0700 Subject: [PATCH 09/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 63795a7..9a4374e 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Then perform the following commands on the root folder: |------|-------------|------|---------|:--------:| | create\_router | Create router instead of using an existing one, uses 'router' variable for new resource name. | `bool` | `false` | no | | enable\_dynamic\_port\_allocation | Enable Dynamic Port Allocation. If minPorts is set, minPortsPerVm must be set to a power of two greater than or equal to 32. | `bool` | `false` | no | -| enable\_endpoint\_independent\_mapping | Specifies if endpoint independent mapping is enabled. | `bool` | `null` | no | +| enable\_endpoint\_independent\_mapping | Specifies if endpoint independent mapping is enabled. | `bool` | `false` | no | | icmp\_idle\_timeout\_sec | Timeout (in seconds) for ICMP connections. Defaults to 30s if not set. Changing this forces a new NAT to be created. | `string` | `"30"` | no | | log\_config\_enable | Indicates whether or not to export logs | `bool` | `false` | no | | log\_config\_filter | Specifies the desired filtering of logs on this NAT. Valid values are: "ERRORS\_ONLY", "TRANSLATIONS\_ONLY", "ALL" | `string` | `"ALL"` | no | From e127ce00741ae7635fecba0427983539d5bff07d Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 15:30:55 -0700 Subject: [PATCH 10/14] Create upgrading_to_v5.0.md --- docs/upgrading_to_v5.0.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/upgrading_to_v5.0.md diff --git a/docs/upgrading_to_v5.0.md b/docs/upgrading_to_v5.0.md new file mode 100644 index 0000000..4a3e72b --- /dev/null +++ b/docs/upgrading_to_v5.0.md @@ -0,0 +1,17 @@ +# Upgrading to v5.0 + +The v5.0 release of *terraform-google-cloud-nat* is a backwards incompatible release. + +## Default enable_endpoint_independent_mapping +The new `enable_endpoint_independent_mapping` default is `false`. + +If you want to keep the old `enable_endpoint_independent_mapping` default of `true`, you should specify it explicitly: + +```diff +module "cloud-nat" { + source = "terraform-google-modules/cloud-nat/google" +- version = "~> 4.1" ++ version = "~> 5.0" +... ++ enable_endpoint_independent_mapping = true +``` From 49a42772975f30147ebed7de691ebfdb6db414a8 Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 15:31:55 -0700 Subject: [PATCH 11/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a4374e..a41c3c0 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ There are multiple examples included in the [examples](./examples/) folder but s ```hcl module "cloud-nat" { source = "terraform-google-modules/cloud-nat/google" - version = "~> 4.1" + version = "~> 5.0" project_id = var.project_id region = var.region router = google_compute_router.router.name From 4e9ef33be7b1b4de394c0b817fc6d46b247442ff Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 15:35:08 -0700 Subject: [PATCH 12/14] Update TestAdvanced.json --- test/integration/advanced/testdata/TestAdvanced.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/advanced/testdata/TestAdvanced.json b/test/integration/advanced/testdata/TestAdvanced.json index 5d104ba..d22aebe 100755 --- a/test/integration/advanced/testdata/TestAdvanced.json +++ b/test/integration/advanced/testdata/TestAdvanced.json @@ -1,5 +1,5 @@ { - "enableEndpointIndependentMapping": true, + "enableEndpointIndependentMapping": false, "enableDynamicPortAllocation": false, "endpointTypes": [ "ENDPOINT_TYPE_VM" From 6241da579ffdf7ce9cdead19367e6249e72efa03 Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 15:35:18 -0700 Subject: [PATCH 13/14] Update TestBasic.json --- test/integration/basic/testdata/TestBasic.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/basic/testdata/TestBasic.json b/test/integration/basic/testdata/TestBasic.json index 6948775..ed97bae 100755 --- a/test/integration/basic/testdata/TestBasic.json +++ b/test/integration/basic/testdata/TestBasic.json @@ -1,6 +1,6 @@ { "autoNetworkTier": "PREMIUM", - "enableEndpointIndependentMapping": true, + "enableEndpointIndependentMapping": false, "enableDynamicPortAllocation": false, "endpointTypes": [ "ENDPOINT_TYPE_VM" From 30362d68672a7d54d023e8bbe1e8650c58ca43b3 Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 30 Oct 2023 15:35:31 -0700 Subject: [PATCH 14/14] Update TestSubnetworks.json --- test/integration/subnetworks/testdata/TestSubnetworks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/subnetworks/testdata/TestSubnetworks.json b/test/integration/subnetworks/testdata/TestSubnetworks.json index ebd1c82..a688f42 100755 --- a/test/integration/subnetworks/testdata/TestSubnetworks.json +++ b/test/integration/subnetworks/testdata/TestSubnetworks.json @@ -1,5 +1,5 @@ { - "enableEndpointIndependentMapping": true, + "enableEndpointIndependentMapping": false, "enableDynamicPortAllocation": false, "endpointTypes":[ "ENDPOINT_TYPE_VM"