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

bigip_ltm_node is adding %1 to node address in the terraform.tfstate file #981

Open
blod001 opened this issue May 16, 2024 · 1 comment
Open

Comments

@blod001
Copy link

blod001 commented May 16, 2024

Environment

  • TMOS/Bigip Version: 17.1.1.1
  • Terraform Version: v1.6.4
  • Terraform bigip provider Version: v1.22.0

Summary

  1. I have created a node with the Terraform resource bigip_ltm_node:
    image

  2. 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.
    image

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”.
image

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

  1. Create a Node with an ip address
  2. 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")

@blod001 blod001 added the bug label May 16, 2024
@blod001 blod001 changed the title bigip_ltm_node is adding %1 to address in the terraform.tfstate file bigip_ltm_node is adding %1 to node address in the terraform.tfstate file May 16, 2024
@pgouband
Copy link
Collaborator

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.

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

No branches or pull requests

2 participants