UNPKG

@pulumi/scm

Version:

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

165 lines 5.98 kB
"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.ServiceConnectionGroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ServiceConnectionGroup resource * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scm from "@pulumi/scm"; * * const config = new pulumi.Config(); * // The folder scope for the SCM resource (e.g., 'Shared', 'Predefined', or a specific folder name). * const folderScope = config.get("folderScope") || "Service Connections"; * //# 1. IKE Crypto Profile (IKE Phase 1) * const example = new scm.IkeCryptoProfile("example", { * name: "example-ike-crypto_sc_grp", * folder: folderScope, * hashes: ["sha256"], * dhGroups: ["group14"], * encryptions: ["aes-256-cbc"], * }); * //# 2. IPsec Crypto Profile (IKE Phase 2) * const exampleIpsecCryptoProfile = new scm.IpsecCryptoProfile("example", { * name: "panw-IPSec-Crypto_sc_grp", * folder: folderScope, * esp: { * encryptions: ["aes-256-gcm"], * authentications: ["sha256"], * }, * dhGroup: "group14", * lifetime: { * hours: 8, * }, * }); * //# 3. IKE Gateway * const exampleIkeGateway = new scm.IkeGateway("example", { * name: "example-gateway_sc_grp", * folder: folderScope, * peerAddress: { * ip: "1.1.1.1", * }, * authentication: { * preSharedKey: { * key: "secret", * }, * }, * protocol: { * ikev1: { * ikeCryptoProfile: example.name, * }, * }, * }); * //# 4. IPsec Tunnel * const exampleIpsecTunnel = new scm.IpsecTunnel("example", { * name: "example-tunnel_sc_grp", * folder: folderScope, * tunnelInterface: "tunnel", * antiReplay: true, * copyTos: false, * enableGreEncapsulation: false, * autoKey: { * ikeGateways: [{ * name: exampleIkeGateway.name, * }], * ipsecCryptoProfile: exampleIpsecCryptoProfile.name, * }, * }, { * dependsOn: [exampleIkeGateway], * }); * //# 5. Service Connection (The target for the group) * const siteAVpnSc = new scm.ServiceConnection("site_a_vpn_sc", { * name: "creating_a_service_connection_sc_grp", * region: "us-west-1a", * ipsecTunnel: exampleIpsecTunnel.name, * subnets: [ * "10.1.0.0/16", * "172.16.0.0/24", * ], * sourceNat: false, * }); * //# 5. Service Connection (The target for the group) * const siteAVpnSc2 = new scm.ServiceConnection("site_a_vpn_sc_2", { * name: "creating_a_service_connection_sc_grp_2", * region: "us-west-1a", * ipsecTunnel: exampleIpsecTunnel.name, * subnets: [ * "10.1.0.0/16", * "172.16.0.0/24", * ], * sourceNat: true, * }); * // ------------------------------------------------------------------ * // II. SERVICE CONNECTION GROUP RESOURCE * // ------------------------------------------------------------------ * //# 6. Service Connection Group (Groups the Service Connection created above) * const exampleGroup = new scm.ServiceConnectionGroup("example_group", { * name: "service-connection-group-app_sc_grp", * targets: [ * siteAVpnSc.name, * siteAVpnSc2.name, * ], * disableSnat: true, * pbfOnly: false, * }); * ``` */ class ServiceConnectionGroup extends pulumi.CustomResource { /** * Get an existing ServiceConnectionGroup 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 ServiceConnectionGroup(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ServiceConnectionGroup. 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'] === ServiceConnectionGroup.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["disableSnat"] = state?.disableSnat; resourceInputs["name"] = state?.name; resourceInputs["pbfOnly"] = state?.pbfOnly; resourceInputs["targets"] = state?.targets; resourceInputs["tfid"] = state?.tfid; } else { const args = argsOrState; if (args?.targets === undefined && !opts.urn) { throw new Error("Missing required property 'targets'"); } resourceInputs["disableSnat"] = args?.disableSnat; resourceInputs["name"] = args?.name; resourceInputs["pbfOnly"] = args?.pbfOnly; resourceInputs["targets"] = args?.targets; resourceInputs["tfid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServiceConnectionGroup.__pulumiType, name, resourceInputs, opts); } } exports.ServiceConnectionGroup = ServiceConnectionGroup; /** @internal */ ServiceConnectionGroup.__pulumiType = 'scm:index/serviceConnectionGroup:ServiceConnectionGroup'; //# sourceMappingURL=serviceConnectionGroup.js.map