@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
177 lines • 6.39 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.Site = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Site resource
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* //# 1. Define the IKE Crypto Profile (IKE Phase 1)
* // Note: The resource name is plural: "scm_ike_crypto_profile"
* const example = new scm.IkeCryptoProfile("example", {
* name: "example-ike-crypto-14",
* folder: "Remote Networks",
* hashes: ["sha256"],
* dhGroups: ["group14"],
* encryptions: ["aes-256-cbc"],
* });
* //# 2. Define the IPsec Crypto Profile (IKE Phase 2)
* // Note: The resource name is plural and nested blocks now use an equals sign (=).
* const exampleIpsecCryptoProfile = new scm.IpsecCryptoProfile("example", {
* name: "PaloAlto-Networks-IPSec-14",
* folder: "Remote Networks",
* esp: {
* encryptions: ["aes-256-gcm"],
* authentications: ["sha256"],
* },
* dhGroup: "group14",
* lifetime: {
* hours: 8,
* },
* });
* //# 3. Define the IKE Gateway
* // Note: The resource name is plural and nested blocks now use an equals sign (=).
* const exampleIkeGateway = new scm.IkeGateway("example", {
* name: "example-gateway-14",
* folder: "Remote Networks",
* peerAddress: {
* ip: "1.1.1.1",
* },
* authentication: {
* preSharedKey: {
* key: "secret",
* },
* },
* protocol: {
* ikev1: {
* ikeCryptoProfile: example.name,
* },
* },
* });
* //# 4. Define the IPsec Tunnel
* // Note: Nested 'auto_key' block uses an equals sign (=).
* const exampleIpsecTunnel = new scm.IpsecTunnel("example", {
* name: "example-tunnel-14",
* folder: "Remote Networks",
* tunnelInterface: "tunnel",
* antiReplay: true,
* copyTos: false,
* enableGreEncapsulation: false,
* autoKey: {
* ikeGateways: [{
* name: exampleIkeGateway.name,
* }],
* ipsecCryptoProfile: exampleIpsecCryptoProfile.name,
* },
* }, {
* dependsOn: [exampleIkeGateway],
* });
* // 1. Define the Remote Network first
* const branchOffice = new scm.RemoteNetwork("branch_office", {
* folder: "Remote Networks",
* name: "example-rn-14",
* region: "us-west-1",
* licenseType: "FWAAS-AGGREGATE",
* ipsecTunnel: exampleIpsecTunnel.name,
* spnName: "us-west-1-spn-1",
* subnets: ["192.168.10.0/24"],
* });
* // 2. Define the Site
* const exampleSite = new scm.Site("example", {
* name: "example-site-14",
* type: "third-party-branch",
* licenseType: "FWAAS-SITE-25Mbps",
* city: "San Jose",
* state: "CA",
* country: "United States",
* zipCode: "95135",
* latitude: "37.293306",
* longitude: "-121.754485",
* members: [{
* name: branchOffice.name,
* remoteNetwork: branchOffice.name,
* mode: "active",
* }],
* qos: {
* profile: "Default Profile",
* cir: 20,
* },
* });
* ```
*/
class Site extends pulumi.CustomResource {
/**
* Get an existing Site 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 Site(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Site. 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'] === Site.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["addressLine1"] = state?.addressLine1;
resourceInputs["addressLine2"] = state?.addressLine2;
resourceInputs["city"] = state?.city;
resourceInputs["country"] = state?.country;
resourceInputs["latitude"] = state?.latitude;
resourceInputs["licenseType"] = state?.licenseType;
resourceInputs["longitude"] = state?.longitude;
resourceInputs["members"] = state?.members;
resourceInputs["name"] = state?.name;
resourceInputs["qos"] = state?.qos;
resourceInputs["state"] = state?.state;
resourceInputs["tfid"] = state?.tfid;
resourceInputs["type"] = state?.type;
resourceInputs["zipCode"] = state?.zipCode;
}
else {
const args = argsOrState;
resourceInputs["addressLine1"] = args?.addressLine1;
resourceInputs["addressLine2"] = args?.addressLine2;
resourceInputs["city"] = args?.city;
resourceInputs["country"] = args?.country;
resourceInputs["latitude"] = args?.latitude;
resourceInputs["licenseType"] = args?.licenseType;
resourceInputs["longitude"] = args?.longitude;
resourceInputs["members"] = args?.members;
resourceInputs["name"] = args?.name;
resourceInputs["qos"] = args?.qos;
resourceInputs["state"] = args?.state;
resourceInputs["type"] = args?.type;
resourceInputs["zipCode"] = args?.zipCode;
resourceInputs["tfid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Site.__pulumiType, name, resourceInputs, opts);
}
}
exports.Site = Site;
/** @internal */
Site.__pulumiType = 'scm:index/site:Site';
//# sourceMappingURL=site.js.map