Skip to content

netascode/terraform-nxos-ospf

Tests

Terraform NX-OS OSPF Module

Manages NX-OS OSPF

Model Documentation: Link

Examples

module "nxos_ospf" {
  source  = "netascode/ospf/nxos"
  version = ">= 0.2.0"

  name = "OSPF1"
  vrfs = [
    {
      vrf                     = "default"
      admin_state             = false
      bandwidth_reference     = 1000
      banwidth_reference_unit = "gbps"
      distance                = 120
      router_id               = "100.1.1.1"
      areas = [
        {
          area = "0.0.0.0"
        },
        {
          area                = "10.0.0.0"
          authentication_type = "md5"
          cost                = 100
          type                = "nssa"
        }
      ]
      interfaces = [
        {
          interface = "vlan100"
        },
        {
          interface             = "vlan101"
          area                  = "10.0.0.0"
          advertise_secondaries = false
          bfd                   = "enabled"
          cost                  = 1000
          dead_interval         = 60
          hello_interval        = 20
          network_type          = "p2p"
          passive               = "enabled"
          authentication_key    = "0 foo"
          authentication_key_id = 12
          authentication_type   = "simple"
          priority              = 100
        }
      ]
    }
  ]
}

Requirements

Name Version
terraform >= 1.3.0
nxos >= 0.5.0

Providers

Name Version
nxos >= 0.5.0

Inputs

Name Description Type Default Required
device A device name from the provider configuration. string null no
name OSPF Process Name. string n/a yes
vrfs OSPF VRF list.
Default value admin_state: true.
Default value bandwidth_reference: 40000.
Choices bandwidth_reference_unit: mbps, gbps. Default value bandwidth_reference_unit: mbps.
Default value distance: 110.
List areas:
Allowed formats area: 0.0.0.10. Default value area: 0.0.0.0.
Choices authentication_type: unspecified, simple, md5, none. Default value authentication_type: unspecified.
Default value cost: 110.
List interfaces:
Default value advertise_secondaries: true.
Allowed formats area: 0.0.0.10. Default value area: 0.0.0.0.
Default value advertise_secondaries: true.
Choices bfd: unspecified, enabled, disabled. Default value bfd: unspecified.
Default value cost: 0.
Default value dead_interval: 0.
Default value hello_interval: 10.
Choices network_type: unspecified, p2p, bcast. Default value network_type: unspecified.
Choices passive: unspecified, enabled, disabled. Default value passive: unspecified.
Default value priority: 1.
Allowed formats authentication_key: '0 ', '3 <3DES-format-encrypted-key>', '7 '. Default value area: 0.0.0.0.
Default value authentication_key_id: 0.
Default value authentication_key_secure_mode: false.
Default value authentication_md5_key_secure_mode: false.
Choices authentication_type: unspecified, simple, md5, none. Default value authentication_type: unspecified.
list(object({
vrf = string
admin_state = optional(bool, true)
bandwidth_reference = optional(number, 40000)
bandwidth_reference_unit = optional(string, "mbps")
distance = optional(number, 110)
router_id = optional(string, "0.0.0.0")
# adjancency_logging_level = optional(string)
areas = optional(list(object({
area = string
authentication_type = optional(string, "unspecified")
cost = optional(number, 1)
type = optional(string, "regular")
})))
interfaces = optional(list(object({
interface = string
advertise_secondaries = optional(bool, true)
area = optional(string, "0.0.0.0")
bfd = optional(string, "unspecified")
cost = optional(number, 0)
dead_interval = optional(number, 0)
hello_interval = optional(number, 10)
network_type = optional(string, "unspecified")
passive = optional(string, "unspecified")
priority = optional(number, 1)
authentication_key = optional(string)
authentication_key_id = optional(number, 0)
authentication_key_secure_mode = optional(bool, false)
authentication_keychain = optional(string)
authentication_md5_key = optional(string)
authentication_md5_key_secure_mode = optional(bool, false)
authentication_type = optional(string)
})))
}))
[] no

Outputs

Name Description
dn Distinguished name of the object.

Resources

Name Type
nxos_ospf_area.ospfArea resource
nxos_ospf_authentication.ospfAuthNewP resource
nxos_ospf_instance.ospfInst resource
nxos_ospf_interface.ospfIf resource
nxos_ospf_vrf.ospfDom resource