@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
142 lines • 4.96 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.Address = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Address resource
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* // This file is embedded using go:embed
* const scmAddrTag1 = new scm.Tag("scm_addr_tag_1", {
* folder: "All",
* name: "scm_addr_tag_1",
* color: "Red",
* });
* const scmAddrTag2 = new scm.Tag("scm_addr_tag_2", {
* folder: "All",
* name: "scm_addr_tag_2",
* color: "Blue",
* });
* const scmAddrTag3 = new scm.Tag("scm_addr_tag_3", {
* folder: "All",
* name: "scm_addr_tag_3",
* color: "Orange",
* });
* // IP Netmask
* const scmAddress1 = new scm.Address("scm_address_1", {
* folder: "Shared",
* name: "scm_address_1",
* description: "Made by Pulumi",
* ipNetmask: "10.2.3.4",
* });
* // IP Range
* const scmAddress2 = new scm.Address("scm_address_2", {
* folder: "Shared",
* name: "scm_address_2",
* description: "Small IP range test",
* ipRange: "192.168.1.10-192.168.1.20",
* });
* // FQDN
* const scmAddress3 = new scm.Address("scm_address_3", {
* folder: "Shared",
* name: "scm_address_3",
* description: "Simple FQDN test",
* fqdn: "example.com",
* });
* // Class C wildcard
* const scmAddress4 = new scm.Address("scm_address_4", {
* folder: "Shared",
* name: "scm_address_4",
* description: "Class C wildcard test",
* ipWildcard: "192.168.1.0/0.0.0.255",
* });
* // Multiple tags
* const scmAddress5 = new scm.Address("scm_address_5", {
* folder: "Shared",
* name: "scm_address_5",
* description: "Multiple tags test",
* ipNetmask: "10.10.10.2/32",
* tags: [
* scmAddrTag1.name,
* scmAddrTag2.name,
* scmAddrTag3.name,
* ],
* }, {
* dependsOn: [
* scmAddrTag1,
* scmAddrTag2,
* scmAddrTag3,
* ],
* });
* ```
*/
class Address extends pulumi.CustomResource {
/**
* Get an existing Address 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 Address(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Address. 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'] === Address.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["description"] = state?.description;
resourceInputs["device"] = state?.device;
resourceInputs["folder"] = state?.folder;
resourceInputs["fqdn"] = state?.fqdn;
resourceInputs["ipNetmask"] = state?.ipNetmask;
resourceInputs["ipRange"] = state?.ipRange;
resourceInputs["ipWildcard"] = state?.ipWildcard;
resourceInputs["name"] = state?.name;
resourceInputs["snippet"] = state?.snippet;
resourceInputs["tags"] = state?.tags;
resourceInputs["tfid"] = state?.tfid;
}
else {
const args = argsOrState;
resourceInputs["description"] = args?.description;
resourceInputs["device"] = args?.device;
resourceInputs["folder"] = args?.folder;
resourceInputs["fqdn"] = args?.fqdn;
resourceInputs["ipNetmask"] = args?.ipNetmask;
resourceInputs["ipRange"] = args?.ipRange;
resourceInputs["ipWildcard"] = args?.ipWildcard;
resourceInputs["name"] = args?.name;
resourceInputs["snippet"] = args?.snippet;
resourceInputs["tags"] = args?.tags;
resourceInputs["tfid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Address.__pulumiType, name, resourceInputs, opts);
}
}
exports.Address = Address;
/** @internal */
Address.__pulumiType = 'scm:index/address:Address';
//# sourceMappingURL=address.js.map