Skip to content

Commit 847054e

Browse files
author
Furkhat Kasymov Genii Uulu
committed
prefix /28 gives 16 ips for ipv4
1 parent f9fdf98 commit 847054e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

castai/resource_node_configuration.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ func resourceNodeConfiguration() *schema.Resource {
267267
Type: schema.TypeInt,
268268
Optional: true,
269269
Default: nil,
270-
Description: "Number of IPs per prefix to be used for calculating max pods.",
270+
Description: "Number of IPs per prefix to be used for calculating max pods. For IPv4 it should be 16. More info: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html#ec2-prefix-basics",
271271
ValidateDiagFunc: validation.ToDiagFunc(validation.IntBetween(0, 256)),
272272
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
273273
log.Printf("[DEBUG] changing 'ips_per_prefix' attribute for eks: old=%s, new=%s", oldValue, newValue)
274-
if oldValue == "1" && newValue == "0" {
274+
if (oldValue == "1" || oldValue == "16") && newValue == "0" {
275275
return true
276276
}
277277
return oldValue == newValue

0 commit comments

Comments
 (0)