citrix / terraform-provider-citrixadc

Part of NetScaler Automation Toolkit | https://github.com/netscaler/automation-toolkit
https://registry.terraform.io/providers/citrix/citrixadc
Apache License 2.0
119 stars 59 forks source link

[BUG] deviation parameter on lbmonitor causes an error #1123

Closed gusmb closed 7 months ago

gusmb commented 8 months ago

Contact us

For any immediate issues or help , reach out to us at NetScaler-AutomationToolkit@cloud.com !

Bug Report

Given the following configuration example for lbmonitor:

image

Terraform validate and plan work correctly, but when I try to apply I get the error:

image

The error suggests that units argument is a pre-req of deviation, but units is not a valid argument according to the docs: https://registry.terraform.io/providers/citrix/citrixadc/latest/docs/resources/lbmonitor Instead, I provided units1, units2, units3 and units4.

To Reproduce Steps to reproduce the behaviour:

  1. My terraform files are (See above)

  2. which terraform command I am getting the error

    # terrafrom apply
  3. Terraform output logs to the log file (./tf.log). Append TF_LOG=TRACE NS_LOG=TRACE TF_LOG_PATH=./tf.log to your terraform command (See above)

  4. Error I am facing on the console (See above)

Expected behaviour I would expect the resource to be properly applied as the units1 parameter is specified as an argument dependency of "deviation"

Screenshots See above

Environment (please fill the following information):

sumanth-lingappa commented 8 months ago

@rohit-myali, Looks similar to https://github.com/netscaler/ansible-collection-netscaleradc/pull/333/files Please check.

gusmb commented 8 months ago

Ok so what I've noticed by running a few terraform tests is that the issue seems to be only when deviation = 0. In that case, it might be that terraform omits this as it has the default value and then complains about a missing value? When I configure deviation set to any other value, Terraform works as expected (I have also tried with values > 60)

rohit-myali commented 8 months ago

Hello @gusmb Thanks for raising the issue. I will work on this and update you as soon as we release it to terraform registry.

rohit-myali commented 7 months ago

Hey @gusmb We have released this and it is now available in the terraform registry. Please download the latest terraform-provider-citrixadc version v1.38.0.