RavinderReddyF5 / terraform-provider-bigip-version0.12

Terraform resources that can configure F5 BIGIP products
Mozilla Public License 2.0
0 stars 0 forks source link

[CLOSED] Need help: Attach a node to a pool, where the node is already a member of a different pool #291

Open RavinderReddyF5 opened 3 years ago

RavinderReddyF5 commented 3 years ago

Issue by mayurikini Tuesday Mar 17, 2020 at 17:50 GMT Originally opened as https://github.com/terraform-providers/terraform-provider-bigip/issues/260


How to add node attachment to a pool when the node is also a member of a different pool. My current usecase is as follows:

2 environments (say A and B) are placed in same big_ip, dependency tree:

virtual server A --> irule A --> pool A 
pool attachment --> nodeX and pool A
-----
virtual server B --> irule B --> pool B
pool attachment --> nodeX and pool B

(S --> T, indicates S is dependent on T) After applying above to env A changes gets applied as expected. When I try to apply above for env B, I get the following error:

Error: Error modifying node /Common/nodeX: 01020066:3: The requested Node (/Common/nodeX) already exists in partition Common.

I thought of importing node X since it exists in f5 and B's tfstate doesn't know about it. I tried importing the node, refreshing state, re-initializing and then apply. Now it is trying to destroy bigip_ltm_node.node and create a new node with same info (I am assuming that is it trying to replace the node).
This returns 2 errors:

  1. Error: 01070110:3: Node address '/Common/nodeX' is referenced by a member of pool '/Common/poolA'. (this is because nodeX is member of pool A)
  2. Error: Error modifying node /Common/nodeX: 01020066:3: The requested Node (/Common/nodeX) already exists in partition Common.

I am not sure if this is issue from my end or provider's end.

Versions: