opnsense_quagga_bgp_routemap (Resource)

Configure route maps for BGP.

Example Usage

// Configure an AS Path
resource "opnsense_quagga_bgp_aspath" "example0" {
  enabled     = false
  description = "aspath0"

  number = 123
  action = "permit"

  as = "_2$"
}

// Configure a prefix list
resource "opnsense_quagga_bgp_prefixlist" "example0" {
  enabled     = false

  description = "prefixlist0"
  name = "example0"

  number = 1234
  action = "permit"

  network = "10.10.0.0"
}
// Configure a community list
resource "opnsense_quagga_bgp_communitylist" "example0" {
  enabled     = false
  description = "communitylist0"

  number     = 100
  seq_number = 99
  action     = "deny"

  community = "example.*"
}

// Configure a route map
resource "opnsense_quagga_bgp_routemap" "example0" {
  enabled     = false
  description = "routemap0"

  name   = "example0"
  action = "deny"

  route_map_id = 100

  aspaths = [
    opnsense_quagga_bgp_aspath.example0.id
  ]

  prefix_lists = [
    opnsense_quagga_bgp_prefixlist.example0.id
  ]

  community_lists = [
    opnsense_quagga_bgp_communitylist.example0.id
  ]

  set = "local-preference 300"
}

Schema

Required

  • name (String) The name of this route map.
  • route_map_id (Number) The Route-map ID between 1 and 65535. Be aware that the sorting will be done under the hood, so when you add an entry between it gets to the right position.

Optional

  • action (String) Set permit for match or deny to negate the rule. Defaults to "permit".
  • aspaths (Set of String) Set the AS Path list IDs to use. Defaults to [].
  • community_lists (Set of String) Set the community list IDs to use. Defaults to [].
  • description (String) An optional description for this route map. Defaults to "".
  • enabled (Boolean) Enable this route map. Defaults to true.
  • prefix_lists (Set of String) Set the prefix list IDs to use. Defaults to [].
  • set (String) Free text field for your set, please be careful! You can set e.g. local-preference 300 or community 1:1 (http://www.nongnu.org/quagga/docs/docs-multi/Route-Map-Set-Command.html#Route-Map-Set-Command). Defaults to "".

Read-Only

  • id (String) UUID of the route map.

Import

In Terraform v1.5.0 and later, use an import block to import opnsense_quagga_bgp_routemap using the id. For example:

import {
  to = opnsense_quagga_bgp_routemap.example
  id = "<opnsense-resource-id>"
}

Using terraform import, import opnsense_quagga_bgp_routemap using the id. For example:

% terraform import opnsense_quagga_bgp_routemap.example <opnsense-resource-id>