diff --git a/README.md b/README.md index 64fe045..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 = "~> 1.2" + version = "~> 5.0" project_id = var.project_id region = var.region router = google_compute_router.router.name @@ -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 | @@ -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 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 +``` 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" -} 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" -} diff --git a/examples/nat_with_compute_engine/versions.tf b/examples/nat_with_compute_engine/versions.tf deleted file mode 100644 index 9ce0f80..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, < 5.0" - } - } - required_version = ">= 0.13" -} diff --git a/examples/nat_with_gke/versions.tf b/examples/nat_with_gke/versions.tf deleted file mode 100644 index 9ce0f80..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, < 5.0" - } - } - required_version = ">= 0.13" -} 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" 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" 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" diff --git a/test/setup/versions.tf b/test/setup/versions.tf index a8963c9..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, < 5.0" + version = ">= 3.53" } google-beta = { source = "hashicorp/google-beta" - version = ">= 3.53, < 5.0" + version = ">= 3.53" } } } 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 } 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 = {