Skip to content

Commit

Permalink
Merge pull request #1032 from F5Networks/devel_poolattach_issue
Browse files Browse the repository at this point in the history
Devel pool attach issue
  • Loading branch information
RavinderReddyF5 authored Dec 3, 2024
2 parents f2c8693 + ff4f8bb commit f9212e2
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 f9212e2

Please sign in to comment.