-
Notifications
You must be signed in to change notification settings - Fork 10
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
Ressource "nxos_ipv4_static_route" import forces replacement #305
Comments
As I use a custom variable for my switches and use a for_each I thought I should try a more simple test against the DevNet AlwaysOn Sandbox (Nexus C9300v version 10.3(3)) and got this results terraform {
required_version = ">= 1.1.0"
required_providers {
nxos = {
source = "CiscoDevNet/nxos"
version = "0.5.7"
}
}
}
provider "nxos" {
alias = "nxos"
username = "Username"
password = "Password"
url = "https://sbx-nxos-mgmt.cisco.com"
}
#STATIC ROUTE TEST
import {
to = nxos_ipv4_static_route.static_route
id = "sys/ipv4/inst/dom-[management]/rt-[0.0.0.0/0]"
}
#STATIC ROUTE TEST
resource "nxos_ipv4_static_route" "static_route" {
provider = nxos.nxos
vrf_name = "management"
prefix = "0.0.0.0/0"
next_hops = [
{
interface_id = "unspecified"
address = "10.10.20.254/32"
vrf_name = "management"
object = 0
preference = 0
tag = 0
}
]
} TF still wants to replace the route
show run on the devnet sandbox
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey guys, I try to manage my nxos (non fabric/aci) switches via terraform and ran into the following issue.
When I try to import my existing static ipv4 routes, terraform wants to replace these routes instead of importing them.
Is there any way to import my existing routes without terraform recreating those?
switch model: N9K-C93360YC-FX2
nxos version: 10.2(5)
my research so far
visore.html page on the switch, to view the dn information on the switch.
I guess the switch is not providing more information on the api call? Maybe a switch update could fix this?
Terraform plan output:
My terraform code looks like this
The route in the show run on the switch looks like this:
The text was updated successfully, but these errors were encountered: