From 980011806c14b264cb6f5defc0098a661130f7cb Mon Sep 17 00:00:00 2001 From: Ludovico Magnocavallo Date: Thu, 23 May 2024 08:38:03 +0200 Subject: [PATCH] fix permadiff in cloud nat module (#2301) --- modules/net-cloudnat/README.md | 2 +- modules/net-cloudnat/variables.tf | 2 +- tests/fast/stages/s2_networking_e_nva_bgp/simple.yaml | 2 -- tests/modules/net_cloudnat/examples/hybrid.yaml | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/net-cloudnat/README.md b/modules/net-cloudnat/README.md index 34fb56066..6d30f0392 100644 --- a/modules/net-cloudnat/README.md +++ b/modules/net-cloudnat/README.md @@ -165,7 +165,7 @@ module "vpc1-nat" { | [project_id](variables.tf#L82) | Project where resources will be created. | string | ✓ | | | [region](variables.tf#L87) | Region where resources will be created. | string | ✓ | | | [addresses](variables.tf#L17) | Optional list of external address self links. | list(string) | | [] | -| [config_port_allocation](variables.tf#L23) | Configuration for how to assign ports to virtual machines. min_ports_per_vm and max_ports_per_vm have no effect unless enable_dynamic_port_allocation is set to 'true'. | object({…}) | | {} | +| [config_port_allocation](variables.tf#L23) | Configuration for how to assign ports to virtual machines. min_ports_per_vm and max_ports_per_vm have no effect unless enable_dynamic_port_allocation is set to 'true'. | object({…}) | | {} | | [config_source_subnetworks](variables.tf#L39) | Subnetwork configuration. | object({…}) | | {} | | [config_timeouts](variables.tf#L58) | Timeout configurations. | object({…}) | | {} | | [logging_filter](variables.tf#L71) | Enables logging if not null, value is one of 'ERRORS_ONLY', 'TRANSLATIONS_ONLY', 'ALL'. | string | | null | diff --git a/modules/net-cloudnat/variables.tf b/modules/net-cloudnat/variables.tf index 27484ee31..d8ca6413c 100644 --- a/modules/net-cloudnat/variables.tf +++ b/modules/net-cloudnat/variables.tf @@ -26,7 +26,7 @@ variable "config_port_allocation" { enable_endpoint_independent_mapping = optional(bool, true) enable_dynamic_port_allocation = optional(bool, false) min_ports_per_vm = optional(number) - max_ports_per_vm = optional(number) + max_ports_per_vm = optional(number, 65536) }) default = {} nullable = false diff --git a/tests/fast/stages/s2_networking_e_nva_bgp/simple.yaml b/tests/fast/stages/s2_networking_e_nva_bgp/simple.yaml index e0316d393..ec1929601 100644 --- a/tests/fast/stages/s2_networking_e_nva_bgp/simple.yaml +++ b/tests/fast/stages/s2_networking_e_nva_bgp/simple.yaml @@ -1515,7 +1515,6 @@ values: log_config: - enable: false filter: ALL - max_ports_per_vm: null name: ew1 nat_ip_allocate_option: AUTO_ONLY nat_ips: null @@ -1548,7 +1547,6 @@ values: log_config: - enable: false filter: ALL - max_ports_per_vm: null name: ew4 nat_ip_allocate_option: AUTO_ONLY nat_ips: null diff --git a/tests/modules/net_cloudnat/examples/hybrid.yaml b/tests/modules/net_cloudnat/examples/hybrid.yaml index dbfdd4981..8b00b509d 100644 --- a/tests/modules/net_cloudnat/examples/hybrid.yaml +++ b/tests/modules/net_cloudnat/examples/hybrid.yaml @@ -28,7 +28,6 @@ values: log_config: - enable: false filter: ALL - max_ports_per_vm: null name: vpc1-nat nat_ip_allocate_option: null nat_ips: null