@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
214 lines • 7.43 kB
JavaScript
"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogicalRouter = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* 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,
* ],
* });
* ```
*/
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, id, state, opts) {
return new LogicalRouter(name, state, { ...opts, id: id });
}
/**
* 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) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === LogicalRouter.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["device"] = state?.device;
resourceInputs["folder"] = state?.folder;
resourceInputs["name"] = state?.name;
resourceInputs["routingStack"] = state?.routingStack;
resourceInputs["snippet"] = state?.snippet;
resourceInputs["tfid"] = state?.tfid;
resourceInputs["vrves"] = state?.vrves;
}
else {
const args = argsOrState;
resourceInputs["device"] = args?.device;
resourceInputs["folder"] = args?.folder;
resourceInputs["name"] = args?.name;
resourceInputs["routingStack"] = args?.routingStack;
resourceInputs["snippet"] = args?.snippet;
resourceInputs["vrves"] = args?.vrves;
resourceInputs["tfid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(LogicalRouter.__pulumiType, name, resourceInputs, opts);
}
}
exports.LogicalRouter = LogicalRouter;
/** @internal */
LogicalRouter.__pulumiType = 'scm:index/logicalRouter:LogicalRouter';
//# sourceMappingURL=logicalRouter.js.map