» panos_panorama_bgp_peer

This resource allows you to add/update/delete a Panorama BGP peer.

» Import Name

<template>:<template_stack>:<virtual_router>:<bgp_peer_group>:<name>

» Example Usage

data "panos_system_info" "x" {}

// Peer definition that will work starting from PAN-OS 6.1.
resource "panos_panorama_bgp_peer" "example" {
    template = "${panos_panorama_template.t.name}"
    virtual_router = "${panos_panorama_bgp.conf.virtual_router}"
    bgp_peer_group = "${panos_panorama_bgp_peer_group.pg.name}"
    name = "peer1"
    peer_as = "${panos_panorama_bgp.conf.as_number}"
    local_address_interface = "${panos_panorama_ethernet_interface.e.name}"
    local_address_ip = "${panos_panorama_ethernet_interface.e.static_ips.0}"
    peer_address_ip = "5.6.7.8"
    max_prefixes = "unlimited"
    bfd_profile = "${
        data.panos_system_info.x.version_major >= 7 ? 
            data.panos_system_info.x.version_minor >= 1 ? "None" : ""
        : ""
    }"
    address_family_type = "${data.panos_system_info.x.version_major >= 8 ? "ipv4" : ""}"
    reflector_client = "${data.panos_system_info.x.version_major >= 8 ? "non-client" : ""}"
    min_route_advertisement_interval = "${
        data.panos_system_info.x.version_major >= 8 ? 
            data.panos_system_info.x.version_minor >= 1 ? 30 : 0
        : 0
    }"
}

resource "panos_panorama_bgp_peer_group" "pg" {
    template = "${panos_panorama_template.t.name}"
    virtual_router = "${panos_panorama_bgp.conf.virtual_router}"
    name = "myName"
    type = "ibgp"
}

resource "panos_panorama_bgp" "conf" {
    template = "${panos_panorama_template.t.name}"
    virtual_router = "${panos_panorama_virtual_router.rtr.name}"
    router_id = "5.5.5.5"
    as_number = "42"
}

resource "panos_panorama_virtual_router" "rtr" {
    template = "${panos_panorama_template.t.name}"
    name = "my virtual router"
    interfaces = ["${panos_panorama_ethernet_interface.e.name}"]
}

resource "panos_panorama_ethernet_interface" "e" {
    template = "${panos_panorama_template.t.name}"
    name = "ethernet1/5"
    mode = "layer3"
    static_ips = ["192.168.1.1/24"]
}

resource "panos_panorama_template" "t" {
    name = "myTemplate"
}

» Argument Reference

One and only one of the following must be specified:

The following arguments are supported: