panorama_plan_bgp
Generate a BGP candidate configuration plan for Panorama-managed firewalls—covering global enable, router-id, local-as, peer groups, peers, and import/export rules with inline prefixes—after IPsec tunnels are applied.
Instructions
[READ-ONLY] Plans ordered BGP candidate mutations (global enable, router-id, local-as, route-install, peer group, two peers, and import/export rules with inline matched prefixes). policyMode records whether empty policies are intentional or explicit rules are required; omission preserves legacy behavior with a warning. Returns the legacy plan wrapper plus common planId, planHash, and summary metadata. Requires prior IPsec apply: each peer's local-address = own (near) tunnel IP, peer-address = far tunnel IP (near + 1 within the /30). A peer without local-address is rejected by PAN-OS. Candidate configuration only; no commit or push is performed. Runtime verification requires a prior manual commit and push to the managed firewall.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vsys | No | Virtual system name | vsys1 |
| peers | Yes | 1 or 2 BGP peers (single or dual deployment) | |
| serial | No | Managed firewall serial number. OPTIONAL — auto-resolved from the template's device assignment when omitted. Only supply it when the template is bound to more than one device. | |
| localAs | No | Local ASN. OPTIONAL — reused from the live committed global BGP when omitted, so a per-deployment run never rewrites the fabric's ASN. A supplied value that differs from the live one is REJECTED. To set a neighbour's ASN use each peer's remoteAs, not this. | |
| firewall | No | Target firewall name (from firewalls.json). Required when multiple firewalls are configured; optional otherwise. | |
| routerId | No | Router ID (IPv4). OPTIONAL — reused from the live committed value when omitted; a differing supplied value is rejected. | |
| template | Yes | Panorama template name (one per firewall) | |
| peerGroup | Yes | ||
| deployment | Yes | Short unique label for this deployment (e.g. 'istanbul-branch-01'). Every created object is prefixed with it, and it must not collide with any existing name — it is the ownership boundary that keeps prod safe. | |
| policyMode | No | BGP policy intent. 'none' requires both rule arrays empty; 'explicit' requires at least one import and one export rule. Omission preserves legacy behavior and returns a warning. | |
| exportRules | Yes | ||
| importRules | Yes | ||
| virtualRouter | No | Virtual router name (Legacy Virtual Router). OPTIONAL — auto-detected from the template's single virtual-router when omitted. Falls back to 'default'/'vr_root' if detection is inconclusive. | |
| pruneOwnedRules | No | When policyMode is explicit or none, delete stale deployment-owned import/export rules that are not in the desired set. Unowned rules are never deleted. | |
| reconcileOwnedRules | No | Alias for pruneOwnedRules. Requires policyMode and reconciles only stale deployment-owned import/export rules. |