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]: The time units in the lb monitor setup are not recognized and seconds are assumed #1165

Open
michalgcsg opened this issue May 21, 2024 · 1 comment · May be fixed by #1208
Open

[Bug]: The time units in the lb monitor setup are not recognized and seconds are assumed #1165

michalgcsg opened this issue May 21, 2024 · 1 comment · May be fixed by #1208
Assignees
Labels

Comments

@michalgcsg
Copy link

Terraform Core Version

1.8.3

citrixadc Provider Version

1.39.0

Operating system

Ubuntu 22.04.4 LTS

Affected Resource(s)

resource "citrixadc_lbmonitor" "tf_lbmonitor_test" {
monitorname = "tf_test_monitor"
type = "TCP"
interval = "60"
}

Equivalent NetScaler CLI Command

add lb monitor tf_test_monitor TCP -deviation 0 -interval 60 -resptimeoutThresh 0 -retries 3 -failureRetries 0 -alertRetries 0 -successRetries 1 -IPMapping 0.0.0.0 -state ENABLED -reverse NO -transparent NO -ipTunnel NO -tos NO -secure NO

Expected Behavior

Subsequent terraform plan/terraform apply commands should not modify the created monitor

Actual Behavior

It looks like the provider does not reflect the time unit set on the interval, which is represented by 1 minute:

show lb monitor tf_test_monitor

  1. Name.......:tf_test_monitor Type......: TCP State....: ENABLED
    Standard parameters:
    Interval.........: 1 min Retries...........: 3
    Response timeout.: 2 sec Down time.........: 30 sec
    Reverse..........: NO Transparent.......: NO
    Secure...........: NO

As a result it thinks that the monitor needs to be updated each time:
mgtest$ terraform plan
citrixadc_lbmonitor.tf_lbmonitor_test: Refreshing state... [id=tf_test_monitor]
citrixadc_lbvserver.lb_test: Refreshing state... [id=lb_test]

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:

citrixadc_lbmonitor.tf_lbmonitor_test will be updated in-place

~ resource "citrixadc_lbmonitor" "tf_lbmonitor_test" {
id = "tf_test_monitor"
~ interval = 1 -> 60
# (87 unchanged attributes hidden)
}

Plan: 0 to add, 1 to change, 0 to destroy.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "citrixadc_lbmonitor" "tf_lbmonitor_test" {
monitorname = "tf_test_monitor"
type = "TCP"
interval = "60"
}

Steps to Reproduce

  1. create the resource of the monitor
  2. run terraform apply to actually create a monitor in the NetScaler
  3. run terraform plan - this will show that the monitor parameter will be updated. This will be relevant to any monitor type as interval is a generic parameter

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

@michalgcsg michalgcsg added the bug label May 21, 2024
@sumanth-lingappa
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants