terraform-google-modules / terraform-google-cloud-nat

Creates and configures Cloud NAT
https://registry.terraform.io/modules/terraform-google-modules/cloud-nat/google
Apache License 2.0
81 stars 68 forks source link

Cloud Nat Module always changed value to default when tcp_established_idle_timeout_sec was set as number #52

Open tacumai opened 3 years ago

tacumai commented 3 years ago

Hi ✋ Hire is Cloud Nat Module's property I'm mentioning

these properties has string type but value is number . It confused me. And we can run plan and apply if the properties were set as number like

variable "nat" {
     name                               = string
     nat_ip_allocate_option             = string
     source_subnetwork_ip_ranges_to_nat = string
-    icmp_idle_timeout_sec              = number
-    min_ports_per_vm                   = number
     tcp_established_idle_timeout_sec   = string
-    tcp_transitory_idle_timeout_sec    = number
-    udp_idle_timeout_sec               = number

especially, tcp_established_idle_timeout_sec is back to default value 1200 when I set any timeout count like 60 as number.

Requests

I suggest that the properties can be also set as number or when users set as number and run terraform plan , generate an error.

Thanks for reading.

morgante commented 3 years ago

Feel free to open a PR for changing this.