Skip to content

Commit

Permalink
fix(lb-pool-member): Add a nil check before accessing member weight
Browse files Browse the repository at this point in the history
  • Loading branch information
deepaksibm authored and hkantare committed Sep 26, 2024
1 parent 605c84e commit c0251dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ibm/service/vpc/resource_ibm_is_lb_pool_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ func lbpmemberGet(d *schema.ResourceData, meta interface{}, lbID, lbPoolID, lbPo
if target.ID != nil {
d.Set(isLBPoolMemberTargetID, *target.ID)
}
d.Set(isLBPoolMemberWeight, *lbPoolMem.Weight)
if lbPoolMem.Weight != nil {
d.Set(isLBPoolMemberWeight, *lbPoolMem.Weight)
}
d.Set(isLBPoolMemberProvisioningStatus, *lbPoolMem.ProvisioningStatus)
d.Set(isLBPoolMemberHealth, *lbPoolMem.Health)
d.Set(isLBPoolMemberHref, *lbPoolMem.Href)
Expand Down

0 comments on commit c0251dc

Please sign in to comment.