From 3b968e7dde37f906cd67683ba90197b64df54e31 Mon Sep 17 00:00:00 2001 From: zachfeld Date: Thu, 24 Feb 2022 13:44:37 -0500 Subject: [PATCH] fix: validation function should check for CIDR range --- internal/service/ec2/launch_template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/ec2/launch_template.go b/internal/service/ec2/launch_template.go index d864e34d7b5..4e9a32e2f92 100644 --- a/internal/service/ec2/launch_template.go +++ b/internal/service/ec2/launch_template.go @@ -531,7 +531,7 @@ func ResourceLaunchTemplate() *schema.Resource { Optional: true, Elem: &schema.Schema{ Type: schema.TypeString, - ValidateFunc: validation.IsIPv4Address, + ValidateFunc: verify.ValidIPv4CIDRNetworkAddress, }, }, "ipv4_prefix_count": { @@ -543,7 +543,7 @@ func ResourceLaunchTemplate() *schema.Resource { Optional: true, Elem: &schema.Schema{ Type: schema.TypeString, - ValidateFunc: validation.IsIPv6Address, + ValidateFunc: verify.ValidIPv6CIDRNetworkAddress, }, }, "ipv6_prefix_count": {