Skip to content

Commit

Permalink
Merge pull request #35228 from Jdsleppy/b-aws_lb-modify-empty-attribu…
Browse files Browse the repository at this point in the history
…tes-bug

aws_lb: Handle case where no updated attributes are supported
  • Loading branch information
ewbankkit authored Jan 11, 2024
2 parents 7db7b99 + 2ec57a6 commit 6687a6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/35228.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_lb: Fix `ValidationError: Attributes cannot be empty` errors
```
4 changes: 4 additions & 0 deletions internal/service/elbv2/load_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6687a6b

Please sign in to comment.