@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
195 lines • 9.6 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActiveDirectory = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = 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}}
* ```
*
* ```sh
* $ pulumi import gcp:netapp/activeDirectory:ActiveDirectory default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ 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, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* 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 ? state.administrators : undefined;
resourceInputs["aesEncryption"] = state ? state.aesEncryption : undefined;
resourceInputs["backupOperators"] = state ? state.backupOperators : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["dns"] = state ? state.dns : undefined;
resourceInputs["domain"] = state ? state.domain : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["encryptDcConnections"] = state ? state.encryptDcConnections : undefined;
resourceInputs["kdcHostname"] = state ? state.kdcHostname : undefined;
resourceInputs["kdcIp"] = state ? state.kdcIp : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["ldapSigning"] = state ? state.ldapSigning : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["netBiosPrefix"] = state ? state.netBiosPrefix : undefined;
resourceInputs["nfsUsersWithLdap"] = state ? state.nfsUsersWithLdap : undefined;
resourceInputs["organizationalUnit"] = state ? state.organizationalUnit : undefined;
resourceInputs["password"] = state ? state.password : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined;
resourceInputs["securityOperators"] = state ? state.securityOperators : undefined;
resourceInputs["site"] = state ? state.site : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["stateDetails"] = state ? state.stateDetails : undefined;
resourceInputs["username"] = state ? state.username : undefined;
}
else {
const args = argsOrState;
if ((!args || args.dns === undefined) && !opts.urn) {
throw new Error("Missing required property 'dns'");
}
if ((!args || args.domain === undefined) && !opts.urn) {
throw new Error("Missing required property 'domain'");
}
if ((!args || args.location === undefined) && !opts.urn) {
throw new Error("Missing required property 'location'");
}
if ((!args || args.netBiosPrefix === undefined) && !opts.urn) {
throw new Error("Missing required property 'netBiosPrefix'");
}
if ((!args || args.password === undefined) && !opts.urn) {
throw new Error("Missing required property 'password'");
}
if ((!args || args.username === undefined) && !opts.urn) {
throw new Error("Missing required property 'username'");
}
resourceInputs["administrators"] = args ? args.administrators : undefined;
resourceInputs["aesEncryption"] = args ? args.aesEncryption : undefined;
resourceInputs["backupOperators"] = args ? args.backupOperators : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["dns"] = args ? args.dns : undefined;
resourceInputs["domain"] = args ? args.domain : undefined;
resourceInputs["encryptDcConnections"] = args ? args.encryptDcConnections : undefined;
resourceInputs["kdcHostname"] = args ? args.kdcHostname : undefined;
resourceInputs["kdcIp"] = args ? args.kdcIp : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["ldapSigning"] = args ? args.ldapSigning : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["netBiosPrefix"] = args ? args.netBiosPrefix : undefined;
resourceInputs["nfsUsersWithLdap"] = args ? args.nfsUsersWithLdap : undefined;
resourceInputs["organizationalUnit"] = args ? args.organizationalUnit : undefined;
resourceInputs["password"] = (args === null || args === void 0 ? void 0 : args.password) ? pulumi.secret(args.password) : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["securityOperators"] = args ? args.securityOperators : undefined;
resourceInputs["site"] = args ? args.site : undefined;
resourceInputs["username"] = args ? args.username : undefined;
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;
/** @internal */
ActiveDirectory.__pulumiType = 'gcp:netapp/activeDirectory:ActiveDirectory';
//# sourceMappingURL=activeDirectory.js.map