Skip to content

Commit

Permalink
fix(enable_endpoint_independent_mapping=false)!: upgraded versions.tf…
Browse files Browse the repository at this point in the history
… to include minor bumps from tpg v5 (#129)

Co-authored-by: Andrew Peabody <andrewpeabody@google.com>
  • Loading branch information
g-awmalik and apeabody committed Oct 30, 2023
1 parent bbb4361 commit 30bcb56
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 110 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 |
Expand Down Expand Up @@ -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

Expand Down
17 changes: 17 additions & 0 deletions docs/upgrading_to_v5.0.md
Original file line number Diff line number Diff line change
@@ -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
```
25 changes: 0 additions & 25 deletions examples/advanced/versions.tf

This file was deleted.

25 changes: 0 additions & 25 deletions examples/basic/versions.tf

This file was deleted.

25 changes: 0 additions & 25 deletions examples/nat_with_compute_engine/versions.tf

This file was deleted.

25 changes: 0 additions & 25 deletions examples/nat_with_gke/versions.tf

This file was deleted.

2 changes: 1 addition & 1 deletion test/integration/advanced/testdata/TestAdvanced.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"enableEndpointIndependentMapping": true,
"enableEndpointIndependentMapping": false,
"enableDynamicPortAllocation": false,
"endpointTypes": [
"ENDPOINT_TYPE_VM"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/basic/testdata/TestBasic.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"autoNetworkTier": "PREMIUM",
"enableEndpointIndependentMapping": true,
"enableEndpointIndependentMapping": false,
"enableDynamicPortAllocation": false,
"endpointTypes": [
"ENDPOINT_TYPE_VM"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/subnetworks/testdata/TestSubnetworks.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"enableEndpointIndependentMapping": true,
"enableEndpointIndependentMapping": false,
"enableDynamicPortAllocation": false,
"endpointTypes":[
"ENDPOINT_TYPE_VM"
Expand Down
4 changes: 2 additions & 2 deletions test/setup/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ terraform {

google = {
source = "hashicorp/google"
version = ">= 4.51, < 5.0"
version = ">= 4.51, < 6"
}

random = {
Expand Down

0 comments on commit 30bcb56

Please sign in to comment.