» panos_bgp_peer

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

» Import Name

<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_bgp_peer" "example" {
    virtual_router = "${panos_bgp.conf.virtual_router}"
    bgp_peer_group = "${panos_bgp_peer_group.pg.name}"
    name = "peer1"
    peer_as = "${panos_bgp.conf.as_number}"
    local_address_interface = "${panos_ethernet_interface.e.name}"
    local_address_ip = "${panos_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_bgp_peer_group" "pg" {
    virtual_router = "${panos_bgp.conf.virtual_router}"
    name = "myName"
    type = "ibgp"
}

resource "panos_bgp" "conf" {
    virtual_router = "${panos_virtual_router.rtr.name}"
    router_id = "5.5.5.5"
    as_number = "42"
}

resource "panos_virtual_router" "rtr" {
    name = "my virtual router"
    interfaces = ["${panos_ethernet_interface.e.name}"]
}

resource "panos_ethernet_interface" "e" {
    name = "ethernet1/5"
    mode = "layer3"
    vsys = "vsys1"
    static_ips = ["192.168.1.1/24"]
}

» Argument Reference

The following arguments are supported: