UNPKG

@pulumi/scm

Version:

A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1

278 lines (277 loc) 8.86 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * LogicalRouter resource * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scm from "@pulumi/scm"; * * // * // Creates various resources used for subsequent examples * // * const scmNextHop = new scm.Variable("scm_next_hop", { * folder: "All", * name: "$scm_next_hop", * description: "Managed by Pulumi", * type: "ip-netmask", * value: "198.18.1.1", * }); * const scmNextHopFqdn = new scm.Variable("scm_next_hop_fqdn", { * folder: "All", * name: "$scm_next_hop_fqdn", * description: "Managed by Pulumi", * type: "fqdn", * value: "nexthop.example.com", * }); * const scmEthernetInterface = new scm.EthernetInterface("scm_ethernet_interface", { * name: "$scm_ethernet_interface", * comment: "Managed by Pulumi", * folder: "ngfw-shared", * layer3: { * ips: [{ * name: "198.18.11.1/24", * }], * }, * }); * const scmBgpInterface = new scm.EthernetInterface("scm_bgp_interface", { * name: "$scm_bgp_interface", * comment: "Managed by Pulumi", * folder: "ngfw-shared", * layer3: { * ips: [{ * name: "198.18.12.1/24", * }], * }, * }); * const bgpAuthProfile = new scm.BgpAuthProfile("bgp_auth_profile", { * folder: "ngfw-shared", * name: "bgp_auth_profile", * secret: "Example123", * }); * // * // Creates a logical router with static routes * // * const scmLogicalRouter = new scm.LogicalRouter("scm_logical_router", { * folder: "ngfw-shared", * name: "scm_logical_router", * routingStack: "advanced", * vrves: [{ * name: "default", * "interface": ["$scm_ethernet_interface"], * routingTable: { * ip: { * staticRoute: [ * { * name: "default-route", * destination: "0.0.0.0/0", * preference: 10, * nexthop: { * ipAddress: "198.18.1.1", * }, * }, * { * name: "internal-route", * "interface": "$scm_ethernet_interface", * destination: "192.168.1.0/24", * preference: 1, * nexthop: { * ipAddress: "$scm_next_hop", * }, * }, * { * name: "route-with-fqdn-nh", * "interface": "$scm_ethernet_interface", * destination: "192.168.2.0/24", * preference: 1, * nexthop: { * fqdn: "$scm_next_hop", * }, * bfd: { * profile: "default", * }, * }, * ], * }, * }, * }], * }, { * dependsOn: [ * scmNextHop, * scmNextHopFqdn, * scmEthernetInterface, * ], * }); * // * // Creates a logical router with bgp configuration * // * const scmBgpRouter = new scm.LogicalRouter("scm_bgp_router", { * folder: "ngfw-shared", * name: "scm_bgp_router", * routingStack: "advanced", * vrves: [{ * name: "default", * "interface": ["$scm_bgp_interface"], * bgp: { * enable: true, * routerId: "198.18.1.254", * localAs: "65535", * installRoute: true, * rejectDefaultRoute: false, * peerGroup: [{ * name: "prisma-access", * addressFamily: { * ipv4: "default", * }, * connectionOptions: { * authentication: "bgp_auth_profile", * }, * peer: [{ * name: "primary-access-primary", * enable: true, * peerAs: 65515, * peerAddress: { * ip: "198.18.1.100", * }, * localAddress: { * "interface": "$scm_bgp_interface", * }, * connectionOptions: { * multihop: "3", * }, * }], * }], * }, * }], * }, { * dependsOn: [ * scmBgpInterface, * bgpAuthProfile, * ], * }); * ``` */ export declare class LogicalRouter extends pulumi.CustomResource { /** * Get an existing LogicalRouter resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LogicalRouterState, opts?: pulumi.CustomResourceOptions): LogicalRouter; /** * Returns true if the given object is an instance of LogicalRouter. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is LogicalRouter; /** * The device in which the resource is defined */ readonly device: pulumi.Output<string | undefined>; /** * The folder in which the resource is defined * * > ℹ️ **Note:** You must specify exactly one of `device`, `folder`, and `snippet`. */ readonly folder: pulumi.Output<string | undefined>; /** * Name */ readonly name: pulumi.Output<string>; /** * Routing stack */ readonly routingStack: pulumi.Output<string | undefined>; /** * The snippet in which the resource is defined * * > ℹ️ **Note:** You must specify exactly one of `device`, `folder`, and `snippet`. */ readonly snippet: pulumi.Output<string | undefined>; readonly tfid: pulumi.Output<string>; /** * Vrf */ readonly vrves: pulumi.Output<outputs.LogicalRouterVrf[] | undefined>; /** * Create a LogicalRouter resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: LogicalRouterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LogicalRouter resources. */ export interface LogicalRouterState { /** * The device in which the resource is defined */ device?: pulumi.Input<string>; /** * The folder in which the resource is defined * * > ℹ️ **Note:** You must specify exactly one of `device`, `folder`, and `snippet`. */ folder?: pulumi.Input<string>; /** * Name */ name?: pulumi.Input<string>; /** * Routing stack */ routingStack?: pulumi.Input<string>; /** * The snippet in which the resource is defined * * > ℹ️ **Note:** You must specify exactly one of `device`, `folder`, and `snippet`. */ snippet?: pulumi.Input<string>; tfid?: pulumi.Input<string>; /** * Vrf */ vrves?: pulumi.Input<pulumi.Input<inputs.LogicalRouterVrf>[]>; } /** * The set of arguments for constructing a LogicalRouter resource. */ export interface LogicalRouterArgs { /** * The device in which the resource is defined */ device?: pulumi.Input<string>; /** * The folder in which the resource is defined * * > ℹ️ **Note:** You must specify exactly one of `device`, `folder`, and `snippet`. */ folder?: pulumi.Input<string>; /** * Name */ name?: pulumi.Input<string>; /** * Routing stack */ routingStack?: pulumi.Input<string>; /** * The snippet in which the resource is defined * * > ℹ️ **Note:** You must specify exactly one of `device`, `folder`, and `snippet`. */ snippet?: pulumi.Input<string>; /** * Vrf */ vrves?: pulumi.Input<pulumi.Input<inputs.LogicalRouterVrf>[]>; }