Skip to content

Commit 81a7d35

Browse files
container: Allow pod_ipv4_cidr_block to accept netmask for container_node_pool (#13993) (#10128)
[upstream:a3d67a9f0e88d1ad5e738ff9ad063203ddd58aa5] Signed-off-by: Modular Magician <[email protected]>
1 parent 0cc5431 commit 81a7d35

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.changelog/13993.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
container: fixed nodepool secondary range validation to allow the use of netmasks.
3+
```

google-beta/services/container/resource_container_node_pool.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131

3232
"github.com/hashicorp/terraform-provider-google-beta/google-beta/tpgresource"
3333
transport_tpg "github.com/hashicorp/terraform-provider-google-beta/google-beta/transport"
34-
"github.com/hashicorp/terraform-provider-google-beta/google-beta/verify"
3534

3635
container "google.golang.org/api/container/v1beta1"
3736
)
@@ -398,12 +397,12 @@ var schemaNodePool = map[string]*schema.Schema{
398397
Description: `The ID of the secondary range for pod IPs. If create_pod_range is true, this ID is used for the new range. If create_pod_range is false, uses an existing secondary range with this ID.`,
399398
},
400399
"pod_ipv4_cidr_block": {
401-
Type: schema.TypeString,
402-
Optional: true,
403-
ForceNew: true,
404-
Computed: true,
405-
ValidateFunc: verify.ValidateIpCidrRange,
406-
Description: `The IP address range for pod IPs in this node pool. Only applicable if create_pod_range is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) to pick a specific range to use.`,
400+
Type: schema.TypeString,
401+
Optional: true,
402+
ForceNew: true,
403+
Computed: true,
404+
DiffSuppressFunc: tpgresource.CidrOrSizeDiffSuppress,
405+
Description: `The IP address range for pod IPs in this node pool. Only applicable if create_pod_range is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. Set to a CIDR notation (e.g. 10.96.0.0/14) to pick a specific range to use.`,
407406
},
408407
"additional_node_network_configs": {
409408
Type: schema.TypeList,

0 commit comments

Comments
 (0)