@pulumi/sdwan
Version:
A Pulumi package for managing resources on Cisco Catalyst SD-WAN.. Based on terraform-provider-sdwan: version v0.4.1
251 lines • 12 kB
JavaScript
;
// *** 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.ServiceLanVpnFeature = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* This resource can manage a Service LAN VPN Feature.
* - Minimum SD-WAN Manager version: `20.12.0`
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as sdwan from "@pulumi/sdwan";
*
* const example = new sdwan.ServiceLanVpnFeature("example", {
* name: "Example",
* description: "My Example",
* featureProfileId: "f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac",
* vpn: 1,
* configDescription: "VPN1",
* ompAdminDistanceIpv4: 1,
* ompAdminDistanceIpv6: 1,
* enableSdwanRemoteAccess: false,
* primaryDnsAddressIpv4: "1.2.3.4",
* secondaryDnsAddressIpv4: "2.3.4.5",
* primaryDnsAddressIpv6: "2001:0:0:1::0",
* secondaryDnsAddressIpv6: "2001:0:0:2::0",
* hostMappings: [{
* hostName: "HOSTMAPPING1",
* listOfIps: ["1.2.3.4"],
* }],
* ipv4StaticRoutes: [{
* networkAddress: "1.2.3.4",
* subnetMask: "0.0.0.0",
* gateway: "nextHop",
* nextHops: [{
* address: "1.2.3.4",
* administrativeDistance: 1,
* }],
* }],
* ipv6StaticRoutes: [{
* prefix: "2001:0:0:1::0/12",
* gateway: "nextHop",
* nextHops: [{
* address: "2001:0:0:1::0",
* administrativeDistance: 1,
* }],
* }],
* services: [{
* serviceType: "FW",
* ipv4Addresses: ["1.2.3.4"],
* tracking: true,
* }],
* serviceRoutes: [{
* networkAddress: "1.2.3.4",
* subnetMask: "0.0.0.0",
* service: "SIG",
* vpn: 0,
* }],
* greRoutes: [{
* networkAddress: "1.2.3.4",
* subnetMask: "0.0.0.0",
* "interface": ["gre01"],
* vpn: 0,
* }],
* ipsecRoutes: [{
* networkAddress: "1.2.3.4",
* subnetMask: "0.0.0.0",
* "interface": ["ipsec01"],
* }],
* natPools: [{
* natPoolName: 1,
* prefixLength: 3,
* rangeStart: "1.2.3.4",
* rangeEnd: "2.3.4.5",
* overload: true,
* direction: "inside",
* }],
* natPortForwards: [{
* natPoolName: 2,
* sourcePort: 122,
* translatePort: 330,
* sourceIp: "1.2.3.4",
* translatedSourceIp: "2.3.4.5",
* protocol: "TCP",
* }],
* staticNats: [{
* natPoolName: 3,
* sourceIp: "1.2.3.4",
* translatedSourceIp: "2.3.4.5",
* staticNatDirection: "inside",
* }],
* nat64V4Pools: [{
* name: "NATPOOL1",
* rangeStart: "1.2.3.4",
* rangeEnd: "2.3.4.5",
* overload: false,
* }],
* ipv4ImportRouteTargets: [{
* routeTarget: "1.1.1.3:200",
* }],
* ipv4ExportRouteTargets: [{
* routeTarget: "1.1.1.3:200",
* }],
* ipv6ImportRouteTargets: [{
* routeTarget: "1.1.1.3:200",
* }],
* ipv6ExportRouteTargets: [{
* routeTarget: "1.1.1.3:200",
* }],
* });
* ```
*
* ## Import
*
* The `pulumi import` command can be used, for example:
*
* Expected import identifier with the format: "service_lan_vpn_feature_id,feature_profile_id"
*
* ```sh
* $ pulumi import sdwan:index/serviceLanVpnFeature:ServiceLanVpnFeature example "f6b2c44c-693c-4763-b010-895aa3d236bd,f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac"
* ```
*/
class ServiceLanVpnFeature extends pulumi.CustomResource {
/**
* Get an existing ServiceLanVpnFeature 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 ServiceLanVpnFeature(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ServiceLanVpnFeature. 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'] === ServiceLanVpnFeature.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["advertiseOmpIpv4s"] = state?.advertiseOmpIpv4s;
resourceInputs["advertiseOmpIpv6s"] = state?.advertiseOmpIpv6s;
resourceInputs["configDescription"] = state?.configDescription;
resourceInputs["configDescriptionVariable"] = state?.configDescriptionVariable;
resourceInputs["description"] = state?.description;
resourceInputs["enableSdwanRemoteAccess"] = state?.enableSdwanRemoteAccess;
resourceInputs["featureProfileId"] = state?.featureProfileId;
resourceInputs["greRoutes"] = state?.greRoutes;
resourceInputs["hostMappings"] = state?.hostMappings;
resourceInputs["ipsecRoutes"] = state?.ipsecRoutes;
resourceInputs["ipv4ExportRouteTargets"] = state?.ipv4ExportRouteTargets;
resourceInputs["ipv4ImportRouteTargets"] = state?.ipv4ImportRouteTargets;
resourceInputs["ipv4StaticRoutes"] = state?.ipv4StaticRoutes;
resourceInputs["ipv6ExportRouteTargets"] = state?.ipv6ExportRouteTargets;
resourceInputs["ipv6ImportRouteTargets"] = state?.ipv6ImportRouteTargets;
resourceInputs["ipv6StaticRoutes"] = state?.ipv6StaticRoutes;
resourceInputs["name"] = state?.name;
resourceInputs["nat64V4Pools"] = state?.nat64V4Pools;
resourceInputs["natPools"] = state?.natPools;
resourceInputs["natPortForwards"] = state?.natPortForwards;
resourceInputs["ompAdminDistanceIpv4"] = state?.ompAdminDistanceIpv4;
resourceInputs["ompAdminDistanceIpv4Variable"] = state?.ompAdminDistanceIpv4Variable;
resourceInputs["ompAdminDistanceIpv6"] = state?.ompAdminDistanceIpv6;
resourceInputs["ompAdminDistanceIpv6Variable"] = state?.ompAdminDistanceIpv6Variable;
resourceInputs["primaryDnsAddressIpv4"] = state?.primaryDnsAddressIpv4;
resourceInputs["primaryDnsAddressIpv4Variable"] = state?.primaryDnsAddressIpv4Variable;
resourceInputs["primaryDnsAddressIpv6"] = state?.primaryDnsAddressIpv6;
resourceInputs["primaryDnsAddressIpv6Variable"] = state?.primaryDnsAddressIpv6Variable;
resourceInputs["routeLeakFromGlobalVpns"] = state?.routeLeakFromGlobalVpns;
resourceInputs["routeLeakFromOtherServices"] = state?.routeLeakFromOtherServices;
resourceInputs["routeLeakToGlobalVpns"] = state?.routeLeakToGlobalVpns;
resourceInputs["secondaryDnsAddressIpv4"] = state?.secondaryDnsAddressIpv4;
resourceInputs["secondaryDnsAddressIpv4Variable"] = state?.secondaryDnsAddressIpv4Variable;
resourceInputs["secondaryDnsAddressIpv6"] = state?.secondaryDnsAddressIpv6;
resourceInputs["secondaryDnsAddressIpv6Variable"] = state?.secondaryDnsAddressIpv6Variable;
resourceInputs["serviceRoutes"] = state?.serviceRoutes;
resourceInputs["services"] = state?.services;
resourceInputs["staticNats"] = state?.staticNats;
resourceInputs["version"] = state?.version;
resourceInputs["vpn"] = state?.vpn;
resourceInputs["vpnVariable"] = state?.vpnVariable;
}
else {
const args = argsOrState;
if (args?.featureProfileId === undefined && !opts.urn) {
throw new Error("Missing required property 'featureProfileId'");
}
resourceInputs["advertiseOmpIpv4s"] = args?.advertiseOmpIpv4s;
resourceInputs["advertiseOmpIpv6s"] = args?.advertiseOmpIpv6s;
resourceInputs["configDescription"] = args?.configDescription;
resourceInputs["configDescriptionVariable"] = args?.configDescriptionVariable;
resourceInputs["description"] = args?.description;
resourceInputs["enableSdwanRemoteAccess"] = args?.enableSdwanRemoteAccess;
resourceInputs["featureProfileId"] = args?.featureProfileId;
resourceInputs["greRoutes"] = args?.greRoutes;
resourceInputs["hostMappings"] = args?.hostMappings;
resourceInputs["ipsecRoutes"] = args?.ipsecRoutes;
resourceInputs["ipv4ExportRouteTargets"] = args?.ipv4ExportRouteTargets;
resourceInputs["ipv4ImportRouteTargets"] = args?.ipv4ImportRouteTargets;
resourceInputs["ipv4StaticRoutes"] = args?.ipv4StaticRoutes;
resourceInputs["ipv6ExportRouteTargets"] = args?.ipv6ExportRouteTargets;
resourceInputs["ipv6ImportRouteTargets"] = args?.ipv6ImportRouteTargets;
resourceInputs["ipv6StaticRoutes"] = args?.ipv6StaticRoutes;
resourceInputs["name"] = args?.name;
resourceInputs["nat64V4Pools"] = args?.nat64V4Pools;
resourceInputs["natPools"] = args?.natPools;
resourceInputs["natPortForwards"] = args?.natPortForwards;
resourceInputs["ompAdminDistanceIpv4"] = args?.ompAdminDistanceIpv4;
resourceInputs["ompAdminDistanceIpv4Variable"] = args?.ompAdminDistanceIpv4Variable;
resourceInputs["ompAdminDistanceIpv6"] = args?.ompAdminDistanceIpv6;
resourceInputs["ompAdminDistanceIpv6Variable"] = args?.ompAdminDistanceIpv6Variable;
resourceInputs["primaryDnsAddressIpv4"] = args?.primaryDnsAddressIpv4;
resourceInputs["primaryDnsAddressIpv4Variable"] = args?.primaryDnsAddressIpv4Variable;
resourceInputs["primaryDnsAddressIpv6"] = args?.primaryDnsAddressIpv6;
resourceInputs["primaryDnsAddressIpv6Variable"] = args?.primaryDnsAddressIpv6Variable;
resourceInputs["routeLeakFromGlobalVpns"] = args?.routeLeakFromGlobalVpns;
resourceInputs["routeLeakFromOtherServices"] = args?.routeLeakFromOtherServices;
resourceInputs["routeLeakToGlobalVpns"] = args?.routeLeakToGlobalVpns;
resourceInputs["secondaryDnsAddressIpv4"] = args?.secondaryDnsAddressIpv4;
resourceInputs["secondaryDnsAddressIpv4Variable"] = args?.secondaryDnsAddressIpv4Variable;
resourceInputs["secondaryDnsAddressIpv6"] = args?.secondaryDnsAddressIpv6;
resourceInputs["secondaryDnsAddressIpv6Variable"] = args?.secondaryDnsAddressIpv6Variable;
resourceInputs["serviceRoutes"] = args?.serviceRoutes;
resourceInputs["services"] = args?.services;
resourceInputs["staticNats"] = args?.staticNats;
resourceInputs["vpn"] = args?.vpn;
resourceInputs["vpnVariable"] = args?.vpnVariable;
resourceInputs["version"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ServiceLanVpnFeature.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServiceLanVpnFeature = ServiceLanVpnFeature;
/** @internal */
ServiceLanVpnFeature.__pulumiType = 'sdwan:index/serviceLanVpnFeature:ServiceLanVpnFeature';
//# sourceMappingURL=serviceLanVpnFeature.js.map