Describe the bug
When configuring an application_persistence_profile_ref for an avi_pool, it works just fine to add the profile. The problem is that I have not found a way to remove the profile if I want to remove that persistence.
Attempting to comment out application_persistence_profile_ref or explicitly setting it to application_persistence_profile_ref="" fails to remove the persistence profile from the pool.
Reproduction steps
- Configure an
avi_pool with a application_persistence_profile_ref
- Run Terraform Apply
- Comment out the
application_persistence_profile_ref or set it to application_persistence_profile_ref=""
- Run Terraform Apply
- Observe that Terraform detects no changes to the
avi_pool and thus does not remove the application_persistence_profile_ref from the avi_pool
Reproduction Terraform HCL:
terraform {
required_providers {
avi = {
source = "vmware/avi"
version = "30.2.2"
}
}
}
provider "avi" {
avi_controller = "avlb-controller.contoso.com"
avi_tenant = "admin"
avi_version = "30.2.2"
}
data "avi_cloud" "cloud" {
name = "mycloud"
}
data "avi_applicationpersistenceprofile" "persistence" {
name = "System-Persistence-Http-Cookie"
}
resource "avi_pool" "pool" {
cloud_ref = data.avi_cloud.cloud.id
name = "clear_persistence"
application_persistence_profile_ref = data.avi_applicationpersistenceprofile.persistence.id
}
Subsequent Terraform apply output:
terraform apply
data.avi_applicationpersistenceprofile.persistence: Reading...
data.avi_cloud.cloud: Reading...
data.avi_cloud.cloud: Read complete after 0s [id=https://avlb-controller.contoso.com/api/cloud/cloud-e56f530b-54c4-45bd-9297-81c5944d3652]
avi_pool.pool: Refreshing state... [id=https://avlb-controller.contoso.com/api/pool/pool-79f823c9-f647-4d51-b3b9-ec50dcee788a]
data.avi_applicationpersistenceprofile.persistence: Read complete after 1s [id=https://avlb-controller.contoso.com/api/applicationpersistenceprofile/applicationpersistenceprofile-878f4af8-5538-4eef-bff1-fdcb2b0bcc79]
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
Expected behavior
Terraform properly clears application_persistence_profile_ref from the avi_pool.
Additional context
No response
Describe the bug
When configuring an
application_persistence_profile_reffor anavi_pool, it works just fine to add the profile. The problem is that I have not found a way to remove the profile if I want to remove that persistence.Attempting to comment out
application_persistence_profile_refor explicitly setting it toapplication_persistence_profile_ref=""fails to remove the persistence profile from the pool.Reproduction steps
avi_poolwith aapplication_persistence_profile_refapplication_persistence_profile_refor set it toapplication_persistence_profile_ref=""avi_pooland thus does not remove theapplication_persistence_profile_reffrom theavi_poolReproduction Terraform HCL:
Subsequent Terraform apply output:
Expected behavior
Terraform properly clears
application_persistence_profile_reffrom theavi_pool.Additional context
No response