Skip to content

Commit

Permalink
Merge pull request #1035 from F5Networks/devel
Browse files Browse the repository at this point in the history
devel sync to master
  • Loading branch information
RavinderReddyF5 authored Dec 3, 2024
2 parents 5bef987 + f9212e2 commit b26ccb6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
3 changes: 1 addition & 2 deletions bigip/resource_bigip_ltm_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,6 @@ func resourceBigipLtmPolicyCreate(ctx context.Context, d *schema.ResourceData, m

p := dataToPolicy(name, d)

d.SetId(name)
err := client.CreatePolicy(&p)
if err != nil {
return diag.FromErr(err)
Expand All @@ -1141,7 +1140,7 @@ func resourceBigipLtmPolicyCreate(ctx context.Context, d *schema.ResourceData, m
if t != nil {
return diag.FromErr(t)
}

d.SetId(name)
if !client.Teem {
id := uuid.New()
uniqueID := id.String()
Expand Down
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
2 changes: 1 addition & 1 deletion docs/resources/bigip_ltm_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "bigip_ltm_pool" "pool" {

* `allow_snat` - (Optional,type `string`) Specifies whether SNATs are automatically enabled or disabled for any connections using this pool,[ Default : `yes`, Possible Values `yes` or `no`].

* `load_balancing_mode` - (Optional, type `string`) Specifies the load balancing method. The default is Round Robin.
* `load_balancing_mode` - (Optional, type `string`) Specifies the load balancing method. The default is `round-robin`. Possible options: [`dynamic-ratio-member`,`dynamic-ratio-node`, `fastest-app-response`,`fastest-node`, `least-connections-members`,`least-connections-node`,`least-sessions`,`observed-member`,`observed-node`,`predictive-member`,`predictive-node`,`ratio-least-connections-member`,`ratio-least-connections-node`,`ratio-member`,`ratio-node`,`ratio-session`,`round-robin`,`weighted-least-connections-member`,`weighted-least-connections-node`]

* `minimum_active_members` - (Optional, type `int`) Specifies whether the system load balances traffic according to the priority number assigned to the pool member,Default Value is `0` meaning `disabled`.

Expand Down

0 comments on commit b26ccb6

Please sign in to comment.