@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
212 lines • 9.74 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! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActiveDirectory = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* ActiveDirectory is the public representation of the active directory config.
*
* To get more information about ActiveDirectory, see:
*
* * [API documentation](https://cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.activeDirectories)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/netapp/volumes/docs/configure-and-use/active-directory/about-ad)
*
* ## Example Usage
*
* ### Netapp Active Directory Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const testActiveDirectoryFull = new gcp.netapp.ActiveDirectory("test_active_directory_full", {
* name: "test-active-directory-full",
* location: "us-central1",
* domain: "ad.internal",
* dns: "172.30.64.3",
* netBiosPrefix: "smbserver",
* username: "user",
* password: "pass",
* aesEncryption: false,
* backupOperators: [
* "test1",
* "test2",
* ],
* administrators: [
* "test1",
* "test2",
* ],
* description: "ActiveDirectory is the public representation of the active directory config.",
* encryptDcConnections: false,
* kdcHostname: "hostname",
* kdcIp: "10.10.0.11",
* labels: {
* foo: "bar",
* },
* ldapSigning: false,
* nfsUsersWithLdap: false,
* organizationalUnit: "CN=Computers",
* securityOperators: [
* "test1",
* "test2",
* ],
* site: "test-site",
* });
* ```
*
* ## Import
*
* ActiveDirectory can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/activeDirectories/{{name}}`
* * `{{project}}/{{location}}/{{name}}`
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, ActiveDirectory can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:netapp/activeDirectory:ActiveDirectory default projects/{{project}}/locations/{{location}}/activeDirectories/{{name}}
* $ pulumi import gcp:netapp/activeDirectory:ActiveDirectory default {{project}}/{{location}}/{{name}}
* $ pulumi import gcp:netapp/activeDirectory:ActiveDirectory default {{location}}/{{name}}
* ```
*/
class ActiveDirectory extends pulumi.CustomResource {
/**
* Get an existing ActiveDirectory 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 ActiveDirectory(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'gcp:netapp/activeDirectory:ActiveDirectory';
/**
* Returns true if the given object is an instance of ActiveDirectory. 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'] === ActiveDirectory.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["administrators"] = state?.administrators;
resourceInputs["aesEncryption"] = state?.aesEncryption;
resourceInputs["backupOperators"] = state?.backupOperators;
resourceInputs["createTime"] = state?.createTime;
resourceInputs["deletionPolicy"] = state?.deletionPolicy;
resourceInputs["description"] = state?.description;
resourceInputs["dns"] = state?.dns;
resourceInputs["domain"] = state?.domain;
resourceInputs["effectiveLabels"] = state?.effectiveLabels;
resourceInputs["encryptDcConnections"] = state?.encryptDcConnections;
resourceInputs["kdcHostname"] = state?.kdcHostname;
resourceInputs["kdcIp"] = state?.kdcIp;
resourceInputs["labels"] = state?.labels;
resourceInputs["ldapSigning"] = state?.ldapSigning;
resourceInputs["location"] = state?.location;
resourceInputs["name"] = state?.name;
resourceInputs["netBiosPrefix"] = state?.netBiosPrefix;
resourceInputs["nfsUsersWithLdap"] = state?.nfsUsersWithLdap;
resourceInputs["organizationalUnit"] = state?.organizationalUnit;
resourceInputs["password"] = state?.password;
resourceInputs["project"] = state?.project;
resourceInputs["pulumiLabels"] = state?.pulumiLabels;
resourceInputs["securityOperators"] = state?.securityOperators;
resourceInputs["site"] = state?.site;
resourceInputs["state"] = state?.state;
resourceInputs["stateDetails"] = state?.stateDetails;
resourceInputs["username"] = state?.username;
}
else {
const args = argsOrState;
if (args?.dns === undefined && !opts.urn) {
throw new Error("Missing required property 'dns'");
}
if (args?.domain === undefined && !opts.urn) {
throw new Error("Missing required property 'domain'");
}
if (args?.location === undefined && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if (args?.netBiosPrefix === undefined && !opts.urn) {
throw new Error("Missing required property 'netBiosPrefix'");
}
if (args?.password === undefined && !opts.urn) {
throw new Error("Missing required property 'password'");
}
if (args?.username === undefined && !opts.urn) {
throw new Error("Missing required property 'username'");
}
resourceInputs["administrators"] = args?.administrators;
resourceInputs["aesEncryption"] = args?.aesEncryption;
resourceInputs["backupOperators"] = args?.backupOperators;
resourceInputs["deletionPolicy"] = args?.deletionPolicy;
resourceInputs["description"] = args?.description;
resourceInputs["dns"] = args?.dns;
resourceInputs["domain"] = args?.domain;
resourceInputs["encryptDcConnections"] = args?.encryptDcConnections;
resourceInputs["kdcHostname"] = args?.kdcHostname;
resourceInputs["kdcIp"] = args?.kdcIp;
resourceInputs["labels"] = args?.labels;
resourceInputs["ldapSigning"] = args?.ldapSigning;
resourceInputs["location"] = args?.location;
resourceInputs["name"] = args?.name;
resourceInputs["netBiosPrefix"] = args?.netBiosPrefix;
resourceInputs["nfsUsersWithLdap"] = args?.nfsUsersWithLdap;
resourceInputs["organizationalUnit"] = args?.organizationalUnit;
resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
resourceInputs["project"] = args?.project;
resourceInputs["securityOperators"] = args?.securityOperators;
resourceInputs["site"] = args?.site;
resourceInputs["username"] = args?.username;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["stateDetails"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "password", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(ActiveDirectory.__pulumiType, name, resourceInputs, opts);
}
}
exports.ActiveDirectory = ActiveDirectory;
//# sourceMappingURL=activeDirectory.js.map