terraform-provider-bigip
terraform-provider-bigip copied to clipboard
bigip_ltm_node is adding %1 to node address in the terraform.tfstate file
Environment
- TMOS/Bigip Version: 17.1.1.1
- Terraform Version: v1.6.4
- Terraform bigip provider Version: v1.22.0
Summary
-
I have created a node with the Terraform resource bigip_ltm_node:
-
Than I have started a “terraform apply” without any changes, but the Terraform is always claiminig that the ip address is configured with an “%1” at the end and wants to remove the “%1”, which is not possible.
The information about the ip with %1 is obviously coming from the F5, so it seems like a kind of a bug ? But in the F5 GUI or CLI the ip address is configured without an “%1”.
We have used the Terraform debug mode and got this information: 2024-05-16T09:09:53.289+0200 [WARN] Provider "provider["registry.terraform.io/f5networks/bigip"]" produced an unexpected new value for module.bigip_ltm_node.bigip_ltm_node.node["node_28"], but we are tolerating it because it is using the legacy plugin SDK. The following problems may be the cause of any confusing errors from downstream operations: - .address: was cty.StringVal("10.70.14.28"), but now cty.StringVal("10.70.14.28%1")
Steps To Reproduce
- Create a Node with an ip address
- Run terraform plan / terraform apply
Expected Behavior
After the creation of a node, terraform should not add %1 to the node ip address in the terraform.tfstate file.
Actual Behavior
After the creation of a node, terraform is adding %1 to the node ip address in the terraform.tfstate file.
2024-05-16T09:09:53.289+0200 [WARN] Provider "provider["registry.terraform.io/f5networks/bigip"]" produced an unexpected new value for module.bigip_ltm_node.bigip_ltm_node.node["node_28"], but we are tolerating it because it is using the legacy plugin SDK. The following problems may be the cause of any confusing errors from downstream operations: - .address: was cty.StringVal("10.70.14.28"), but now cty.StringVal("10.70.14.28%1")
Hi @blod001,
I tested with version 1.22.1 and there is no error related to %1.
$ terraform plan -out cert
Terraform used the selected providers to generate the following execution plan.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# bigip_ltm_node.node will be created
+ resource "bigip_ltm_node" "node" {
+ address = "192.168.30.1"
+ connection_limit = 0
+ description = "Test-Node"
+ dynamic_ratio = 1
+ id = (known after apply)
+ monitor = "/Common/icmp"
+ name = "/Common/terraform_node1"
+ rate_limit = "disabled"
+ ratio = (known after apply)
+ session = (known after apply)
+ state = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
───────────────────────────────────────────────────────────────────────────────
Saved the plan to: cert
To perform exactly these actions, run the following command to apply:
terraform apply "cert"
$ terraform apply "cert"
bigip_ltm_node.node: Creating...
bigip_ltm_node.node: Creation complete after 0s [id=/Common/terraform_node1]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
$ terraform plan -out cert
bigip_ltm_node.node: Refreshing state... [id=/Common/terraform_node1]
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.