diff --git a/.changelog/35228.txt b/.changelog/35228.txt new file mode 100644 index 000000000000..9b682d64338f --- /dev/null +++ b/.changelog/35228.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/aws_lb: Fix `ValidationError: Attributes cannot be empty` errors +``` diff --git a/internal/service/elbv2/load_balancer.go b/internal/service/elbv2/load_balancer.go index 45d7f76ba43a..7f30fedd3f38 100644 --- a/internal/service/elbv2/load_balancer.go +++ b/internal/service/elbv2/load_balancer.go @@ -667,6 +667,10 @@ func modifyLoadBalancerAttributes(ctx context.Context, conn *elbv2.ELBV2, arn st // Not all attributes are supported in all partitions. for { + if len(input.Attributes) == 0 { + return nil + } + _, err := conn.ModifyLoadBalancerAttributesWithContext(ctx, input) if err != nil {