Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TF tries to change monitor type instead of destroying and creating new #1168

Open
Artlb opened this issue May 23, 2024 · 0 comments
Open
Assignees
Labels
bug In-Progress ..being worked upon

Comments

@Artlb
Copy link

Artlb commented May 23, 2024

Terraform Core Version

1.3.2

citrixadc Provider Version

1.36.0

Operating system

windows

Affected Resource(s)

citrixadc_lbmonitor

Equivalent NetScaler CLI Command

Primary> rm lb monitor mon-1234-test.com PING
Primary> add lb monitor mon-1234-test.com tcp

Expected Behavior

When trying to change type of monitor (and keep the same name) from ie PING to TCP on ADC we need to remove existing monitor and create new one of new type. ADC is not allowing us to change type of existing monitor after creation

Actual Behavior

TF is just trying to change type of the monitor

Relevant Error/Panic Output Snippet

PLAN
 # citrixadc_lbmonitor.tf_lbmonitor_udp["1234-test.com"] will be updated in-place
  ~ resource "citrixadc_lbmonitor" "tf_lbmonitor_udp" {
        id                             = "mon-1234-test.com"
      ~ type                           = "PING" -> "TCP"
APPLY:
│ Error: [ERROR] netscaler-provider: Error updating lbmonitor mon-1234-test.com
│ 
│   with citrixadc_lbmonitor.tf_lbmonitor_udp["1234-test.com"],
│   on create_udp_services.tf line 52, in resource "citrixadc_lbmonitor" "tf_lbmonitor_udp":
│   52: resource "citrixadc_lbmonitor" "tf_lbmonitor_udp" {

Terraform Configuration Files

Create Service Group monitoring

resource "citrixadc_lbmonitor" "tf_lbmonitor_udp" {
for_each = { for service in local.udp_servicemap: service.name => service }
monitorname = "mon-${each.value.name}${each.value.nameSuffix}"
lrtm = "DISABLED"
type = each.value.MonitorType
}

resource "citrixadc_servicegroup_lbmonitor_binding" "tf_binding_udp" {
for_each = { for service in local.udp_servicemap: service.name => service }
servicegroupname = citrixadc_servicegroup.tf_servicegroup_udp[each.value.name].servicegroupname
monitorname = citrixadc_lbmonitor.tf_lbmonitor_udp[each.value.name].monitorname
weight = 1
}

Steps to Reproduce

try changing type of existing monitor bind to existing service

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

@Artlb Artlb added the bug label May 23, 2024
@rohit-myali rohit-myali self-assigned this May 27, 2024
@rohit-myali rohit-myali added the In-Progress ..being worked upon label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug In-Progress ..being worked upon
Projects
None yet
Development

No branches or pull requests

2 participants