F5Networks / terraform-provider-bigip

Terraform resources that can configure F5 BIG-IP products
https://registry.terraform.io/providers/F5Networks/bigip/latest/docs
Mozilla Public License 2.0
103 stars 119 forks source link

Virtual Server 0.0.0.0 Mask Conversion #919

Closed edavie closed 7 months ago

edavie commented 9 months ago

Environment

Summary

When creating virtual server resources with a mask set to "0.0.0.0" this is converted to "any" on the bigip appliances while "0.0.0.0" is what is saved within state. As a result, any time you run any subsequent plans you will always get drift showing up for virtual server resources:

      ~ mask                       = "any" -> "0.0.0.0"

Steps To Reproduce

Steps to reproduce the behavior:

  1. Define a virtual server resource using the bigip terraform provider with a mask set to "0.0.0.0"

  2. Deploy this virtual server via Terraform

  3. Run "terraform plan" against the above virtual server and note the drift:

      ~ mask                       = "any" -> "0.0.0.0"

Expected Behavior

When defining a mask of "0.0.0.0" on a virtual server this should be converted to "any" when added to state. Alternatively, add a means to pass "any" as a mask value as opposed to just "0.0.0.0" to match what is ultimately ending up on bigip appliances. Regardless, this would result in cleaning up plan output substantially.

Actual Behavior

Passing a mask value of "0.0.0.0" is accepted as it is indeed a valid mask and stored in state. Unfortunately, this value is converted to "any" on an appliance. "Any" and "0.0.0.0" are the same thing as far as a bigip appliance is concerned but the resulting conversion results in drift between what is within Terraform state vs what is within an appliance's configuration.

pgouband commented 9 months ago

Hi,

Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1411.

RavinderReddyF5 commented 7 months ago

fixed in v1.21.0