Skip to content

Commit

Permalink
aws_lb_target_group: always support ip_address_type
Browse files Browse the repository at this point in the history
ip_address_type is supported for both type instance and type IP

Fixes #35010
  • Loading branch information
arianvp authored Mar 16, 2024
1 parent dbccf03 commit b6e5102
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions internal/service/elbv2/target_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,8 @@ func resourceTargetGroupCreate(ctx context.Context, d *schema.ResourceData, meta
input.ProtocolVersion = aws.String(d.Get("protocol_version").(string))
}
input.VpcId = aws.String(d.Get("vpc_id").(string))

if targetType == elbv2.TargetTypeEnumIp {
if v, ok := d.GetOk("ip_address_type"); ok {
input.IpAddressType = aws.String(v.(string))
}
if v, ok := d.GetOk("ip_address_type"); ok {
input.IpAddressType = aws.String(v.(string))
}
}

Expand Down

0 comments on commit b6e5102

Please sign in to comment.