Closed mobig closed 1 year ago
Hi @mobig
Unfortunately the nxos_rest
resource does not detect drifts on its children. Thus, the recommendation is to use dedicated instances of the nxos_rest
resource for each MO, as the example below shows:
resource "nxos_rest" "bgp_af" {
dn = "sys/bgp/inst/dom-default/af-[ipv4-ucast]"
class_name = "bgpDomAf"
content = {
type = "ipv4-ucast"
}
}
resource "nxos_rest" "bgp_prefix" {
dn = "${nxos_rest.bgp_af.id}/prefix-[192.168.1.0/24]"
class_name = "bgpAdvPrefix"
content = {
addr = "192.168.1.0/24"
}
}
I have tested this HCL configuration and it is idempotent.
Anyways, we are also currently working on a dedicated resource for the BGP Prefixes. It will come in the next release
A dedicated resource is available in v0.5.1 .
We need the ability to add BGP network statements to our BGP configuration. here is an example
I am using the following nxos_rest resource to configure this and it works, but terraform keeps telling me that it's adding the addr value every time we apply
This is what terraform tells me
Like i said, it still pushes the change and configures the network statement in the BGP config, but I don't like Terraform telling me that it's changing something that's not really changing. I'm sure it has something to do with how the NX-API is presenting the data after it's added and it's throwing Terraform off, so it thinks it's a change.
BTW, I appreciate all the support thus far with all the new features added. It seems like the provider is really coming along.