@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
107 lines • 4.1 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.DynamicUserGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* DynamicUserGroup resource
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* // First, create the tags that will be used in the dynamic user group's filter.
* const scmDugTag1 = new scm.Tag("scm_dug_tag_1", {
* folder: "All",
* name: "scm_dug_tag_1",
* color: "Red",
* });
* const scmDugTag2 = new scm.Tag("scm_dug_tag_2", {
* folder: "All",
* name: "scm_dug_tag_2",
* color: "Blue",
* });
* const scmDugTag3 = new scm.Tag("scm_dug_tag_3", {
* folder: "All",
* name: "scm_dug_tag_3",
* color: "Green",
* });
* // Create the dynamic user group that references the tags above.
* const scmDug1 = new scm.DynamicUserGroup("scm_dug_1", {
* folder: "Shared",
* name: "scm_dug_1",
* description: "DUG created for Terraform",
* filter: pulumi.interpolate`'${scmDugTag1.name}' or '${scmDugTag2.name}' and '${scmDugTag3.name}'`,
* tags: [scmDugTag1.name],
* }, {
* dependsOn: [
* scmDugTag1,
* scmDugTag2,
* scmDugTag3,
* ],
* });
* ```
*/
class DynamicUserGroup extends pulumi.CustomResource {
/**
* Get an existing DynamicUserGroup 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 DynamicUserGroup(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of DynamicUserGroup. 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'] === DynamicUserGroup.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["description"] = state?.description;
resourceInputs["device"] = state?.device;
resourceInputs["filter"] = state?.filter;
resourceInputs["folder"] = state?.folder;
resourceInputs["name"] = state?.name;
resourceInputs["snippet"] = state?.snippet;
resourceInputs["tags"] = state?.tags;
resourceInputs["tfid"] = state?.tfid;
}
else {
const args = argsOrState;
if (args?.filter === undefined && !opts.urn) {
throw new Error("Missing required property 'filter'");
}
resourceInputs["description"] = args?.description;
resourceInputs["device"] = args?.device;
resourceInputs["filter"] = args?.filter;
resourceInputs["folder"] = args?.folder;
resourceInputs["name"] = args?.name;
resourceInputs["snippet"] = args?.snippet;
resourceInputs["tags"] = args?.tags;
resourceInputs["tfid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DynamicUserGroup.__pulumiType, name, resourceInputs, opts);
}
}
exports.DynamicUserGroup = DynamicUserGroup;
/** @internal */
DynamicUserGroup.__pulumiType = 'scm:index/dynamicUserGroup:DynamicUserGroup';
//# sourceMappingURL=dynamicUserGroup.js.map