You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for the nsxt_policy_bgp_config resource states:
Since BGP config is autocreated by the backend, and terraform create is de-facto an update, importing the resource is not useful and thus not supported.
That is technically correct, but poses a problem when you import an existing T0 gateway along with its bgp neighbors (which we had to do a couple of for .... reasons).
The workflow is as follows:
Define nsxt_policy_bgp_config resource without import statement (would overwite config 1:1, not a problem)
Define nsxt_policy_bgp_neighbors for all existing neighbors using the nsxt_policy_bgp_config resource along with import blocks to import the actual neighbors
This then happens:
# nsxt_policy_bgp_neighbor.t0-routers-bgp-neighbors["neighbor-name"] must be replaced
# (imported from "t0-router/t0-router-localeservices/neighbor-name")
# Warning: this will destroy the imported resource
-/+ resource "nsxt_policy_bgp_neighbor" "t0-routers-bgp-neighbors" {
~ bgp_path = "/infra/tier-0s/t0-router/locale-services/t0-router-localeservices/bgp" -> (known after apply) # forces replacement
We can work around that by applying the bgp config first and then importing the bgp neighbors, but the way we have structured our t0 code makes this impractical.
My question would be if an import for the nsxt_policy_bgp_config resource would be possible for a scenario like this?
Use Case(s)
Importing a t0 router using the nsxt_policy_bgp_config as well as nsxt_policy_bgp_neighbor resources in a single step.
Potential Configuration
See above.
References
No response
The text was updated successfully, but these errors were encountered:
Description
The documentation for the nsxt_policy_bgp_config resource states:
That is technically correct, but poses a problem when you import an existing T0 gateway along with its bgp neighbors (which we had to do a couple of for .... reasons).
The workflow is as follows:
This then happens:
We can work around that by applying the bgp config first and then importing the bgp neighbors, but the way we have structured our t0 code makes this impractical.
My question would be if an import for the nsxt_policy_bgp_config resource would be possible for a scenario like this?
Use Case(s)
Importing a t0 router using the nsxt_policy_bgp_config as well as nsxt_policy_bgp_neighbor resources in a single step.
Potential Configuration
See above.
References
No response
The text was updated successfully, but these errors were encountered: