@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
143 lines • 5.46 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.IpsecTunnel = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* IpsecTunnel 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",
* 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-Crypto",
* 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",
* 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",
* folder: "Remote Networks",
* tunnelInterface: "tunnel",
* antiReplay: true,
* copyTos: false,
* enableGreEncapsulation: false,
* autoKey: {
* ikeGateways: [{
* name: exampleIkeGateway.name,
* }],
* ipsecCryptoProfile: exampleIpsecCryptoProfile.name,
* },
* }, {
* dependsOn: [exampleIkeGateway],
* });
* ```
*/
class IpsecTunnel extends pulumi.CustomResource {
/**
* Get an existing IpsecTunnel 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 IpsecTunnel(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of IpsecTunnel. 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'] === IpsecTunnel.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["antiReplay"] = state?.antiReplay;
resourceInputs["autoKey"] = state?.autoKey;
resourceInputs["copyTos"] = state?.copyTos;
resourceInputs["device"] = state?.device;
resourceInputs["enableGreEncapsulation"] = state?.enableGreEncapsulation;
resourceInputs["folder"] = state?.folder;
resourceInputs["name"] = state?.name;
resourceInputs["snippet"] = state?.snippet;
resourceInputs["tfid"] = state?.tfid;
resourceInputs["tunnelInterface"] = state?.tunnelInterface;
resourceInputs["tunnelMonitor"] = state?.tunnelMonitor;
}
else {
const args = argsOrState;
if (args?.autoKey === undefined && !opts.urn) {
throw new Error("Missing required property 'autoKey'");
}
resourceInputs["antiReplay"] = args?.antiReplay;
resourceInputs["autoKey"] = args?.autoKey;
resourceInputs["copyTos"] = args?.copyTos;
resourceInputs["device"] = args?.device;
resourceInputs["enableGreEncapsulation"] = args?.enableGreEncapsulation;
resourceInputs["folder"] = args?.folder;
resourceInputs["name"] = args?.name;
resourceInputs["snippet"] = args?.snippet;
resourceInputs["tunnelInterface"] = args?.tunnelInterface;
resourceInputs["tunnelMonitor"] = args?.tunnelMonitor;
resourceInputs["tfid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(IpsecTunnel.__pulumiType, name, resourceInputs, opts);
}
}
exports.IpsecTunnel = IpsecTunnel;
/** @internal */
IpsecTunnel.__pulumiType = 'scm:index/ipsecTunnel:IpsecTunnel';
//# sourceMappingURL=ipsecTunnel.js.map