Open scu-cmoore1 opened 2 months ago
Hi @scu-cmoore1,
I tested with version 1.22.1 the following with success.
resource "bigip_ltm_monitor" "monitor" {
name = "/Common/test_http_monitor"
parent = "/Common/http"
}
resource "bigip_ltm_pool" "pool" {
name = "/Common/test_pool"
load_balancing_mode = "least-connections-member"
minimum_active_members = 1
monitors = [bigip_ltm_monitor.monitor.name]
depends_on = [
bigip_ltm_monitor.monitor
]
}
resource "bigip_ltm_virtual_server" "http" {
name = "/Common/test_http"
destination = "1.1.1.1"
port = 443
source_address_translation = "automap"
translate_address = "enabled"
translate_port = "enabled"
pool = bigip_ltm_pool.pool.name
profiles = [ "/Common/tcp", "/Common/http", "/Common/oneconnect" ]
irules = [ ]
depends_on = [
bigip_ltm_pool.pool
]
}
Change LB mode:
resource "bigip_ltm_monitor" "monitor" {
name = "/Common/test_http_monitor"
parent = "/Common/http"
}
resource "bigip_ltm_pool" "pool" {
name = "/Common/test_pool"
load_balancing_mode = "ratio-member"
minimum_active_members = 1
monitors = [bigip_ltm_monitor.monitor.name]
depends_on = [
bigip_ltm_monitor.monitor
]
}
resource "bigip_ltm_virtual_server" "http" {
name = "/Common/test_http"
destination = "1.1.1.1"
port = 443
source_address_translation = "automap"
translate_address = "enabled"
translate_port = "enabled"
pool = bigip_ltm_pool.pool.name
profiles = [ "/Common/tcp", "/Common/http", "/Common/oneconnect" ]
irules = [ ]
depends_on = [
bigip_ltm_pool.pool
]
}
$ terraform plan -out pool
bigip_ltm_monitor.monitor: Refreshing state... [id=/Common/test_http_monitor]
bigip_ltm_pool.pool: Refreshing state... [id=/Common/test_pool]
bigip_ltm_virtual_server.http: Refreshing state... [id=/Common/test_http]
Terraform used the selected providers to generate the following execution plan.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# bigip_ltm_pool.pool will be updated in-place
~ resource "bigip_ltm_pool" "pool" {
id = "/Common/test_pool"
~ load_balancing_mode = "least-connections-member" -> "ratio-member"
name = "/Common/test_pool"
# (7 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
───────────────────────────────────────────────────────────────────────────────
Saved the plan to: pool
To perform exactly these actions, run the following command to apply:
terraform apply "pool"
$ terraform apply "pool"
bigip_ltm_pool.pool: Modifying... [id=/Common/test_pool]
bigip_ltm_pool.pool: Modifications complete after 0s [id=/Common/test_pool]
Can you test with version 1.22.1?
Environment
Summary
When updating a
bigip_ltm_pool
, Terraform says in place update but an error is returned saying the pool can't be deleted as it is in use.Steps To Reproduce
Now updating the pool resource will cause the error as it is in use by the virtual server http
Expected Behavior
The pool is successfully modified with the changes.
Actual Behavior
An error is thrown in Terraform
Terraform plan
Error