nsxt_logical_routers – Create a Logical Router

New in version 2.7.

Synopsis

  • Creates a logical router. The required parameters are router_type (TIER0 or TIER1) and edge_cluster_id (TIER0 only). Optional parameters include internal and external transit network addresses.

Parameters

Parameter Choices/Defaults Comments
advanced_config
dictionary
Contains config properties for tier0 routers
allocation_profile
dictionary
Configurations options to auto allocate edge cluster members for logical router. Auto allocation is supported only for TIER1 and pick least utilized member post current assignment for next allocation.
description
string
Description of the resource
display_name
string / required
Display name
edge_cluster_member_indices
list
For stateful services, the logical router should be associated with edge cluster. For TIER 1 logical router, for manual placement of service router within the cluster, edge cluster member indices needs to be provided else same will be auto-allocated. You can provide maximum two indices for HA ACTIVE_STANDBY. For TIER0 logical router this property is no use and placement is derived from logical router uplink or loopback port.
edge_cluster_name
string
Name of edge cluster
failover_mode
string
Determines the behavior when a logical router instance restarts after a failure. If set to PREEMPTIVE, the preferred node will take over, even if it causes another failure. If set to NON_PREEMPTIVE, then the instance that restarted will remain secondary. This property must not be populated unless the high_availability_mode property is set to ACTIVE_STANDBY. If high_availability_mode property is set to ACTIVE_STANDBY and this property is not specified then default will be NON_PREEMPTIVE.
high_availability_mode
string
High availability mode
hostname
string / required
Deployed NSX manager hostname.
ipv6_profiles
dictionary
IPv6 Profiles
password
string / required
The password to authenticate with the NSX manager.
preferred_edge_cluster_member_index
integer
Used for tier0 routers only
resource_type
string
    Choices:
  • LogicalRouter
A Policy Based VPN requires to define protect rules that match local and peer subnets. IPSec security associations is negotiated for each pair of local and peer subnet. A Route Based VPN is more flexible, more powerful and recommended over policy based VPN. IP Tunnel port is created and all traffic routed via tunnel port is protected. Routes can be configured statically or can be learned through BGP. A route based VPN is must for establishing redundant VPN session to remote site.
router_type
string / required
Type of Logical Router
state
- / required
    Choices:
  • present
  • absent
State can be either 'present' or 'absent'. 'present' is used to create or update resource. 'absent' is used to delete resource.
tags
list
Opaque identifiers meaningful to the API user
username
string / required
The username to authenticate with the NSX manager.

Examples

- name: Create a Logical Router
  nsxt_logical_routers:
      hostname: "10.192.167.137"
      username: "admin"
      password: "Admin!23Admin"
      validate_certs: False
      resource_type: LogicalRouter
      description: "Router West"
      display_name: "tier-0"
      edge_cluster_name: edge-cluster-1
      router_type: TIER0
      high_availability_mode: ACTIVE_ACTIVE
      state: present

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by the Ansible Community. [community]

Authors

  • Rahul Raghuvanshi