Skip to content

Commit

Permalink
pool attach issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RavinderReddyF5 committed Nov 14, 2024
1 parent 9c7ea86 commit ff4f8bb
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions bigip/resource_bigip_ltm_pool_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,12 @@ func resourceBigipLtmPoolAttachmentRead(ctx context.Context, d *schema.ResourceD
for _, node := range nodes.PoolMembers {
if expected == node.FullPath {
_ = d.Set("node", expected)
_ = d.Set("priority_group", node.PriorityGroup)
_ = d.Set("ratio", node.Ratio)
_ = d.Set("connection_limit", node.ConnectionLimit)
_ = d.Set("connection_rate_limit", node.RateLimit)
_ = d.Set("dynamic_ratio", node.DynamicRatio)
_ = d.Set("monitor", node.Monitor)
found = true
break
}
Expand All @@ -337,6 +343,12 @@ func resourceBigipLtmPoolAttachmentRead(ctx context.Context, d *schema.ResourceD
for _, node := range nodes.PoolMembers {
if expected == node.Name {
_ = d.Set("node", expected)
_ = d.Set("priority_group", node.PriorityGroup)
_ = d.Set("ratio", node.Ratio)
_ = d.Set("connection_limit", node.ConnectionLimit)
_ = d.Set("connection_rate_limit", node.RateLimit)
_ = d.Set("dynamic_ratio", node.DynamicRatio)
_ = d.Set("monitor", node.Monitor)
found = true
break
}
Expand Down Expand Up @@ -402,6 +414,13 @@ func resourceBigipLtmPoolAttachmentImport(ctx context.Context, d *schema.Resourc
found := false
for _, node := range nodes.PoolMembers {
if expectedNode == node.FullPath {
_ = d.Set("node", expectedNode)
_ = d.Set("priority_group", node.PriorityGroup)
_ = d.Set("ratio", node.Ratio)
_ = d.Set("connection_limit", node.ConnectionLimit)
_ = d.Set("connection_rate_limit", node.RateLimit)
_ = d.Set("dynamic_ratio", node.DynamicRatio)
_ = d.Set("monitor", node.Monitor)
found = true
break
}
Expand All @@ -410,9 +429,7 @@ func resourceBigipLtmPoolAttachmentImport(ctx context.Context, d *schema.Resourc
if !found {
return nil, fmt.Errorf("cannot locate node %s in pool %s", expectedNode, poolName)
}

_ = d.Set("pool", poolName)
_ = d.Set("node", expectedNode)

d.SetId(id)

Expand Down

0 comments on commit ff4f8bb

Please sign in to comment.