UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

129 lines 6.01 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.OntapStorageVirtualMachine = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a FSx Storage Virtual Machine. * See the [FSx ONTAP User Guide](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-svms.html) for more information. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.fsx.OntapStorageVirtualMachine("test", { * fileSystemId: testAwsFsxOntapFileSystem.id, * name: "test", * }); * ``` * * ### Using a Self-Managed Microsoft Active Directory * * Additional information for using AWS Directory Service with ONTAP File Systems can be found in the [FSx ONTAP Guide](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/self-managed-AD.html). * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.fsx.OntapStorageVirtualMachine("test", { * fileSystemId: testAwsFsxOntapFileSystem.id, * name: "mysvm", * activeDirectoryConfiguration: { * netbiosName: "mysvm", * selfManagedActiveDirectoryConfiguration: { * dnsIps: [ * "10.0.0.111", * "10.0.0.222", * ], * domainName: "corp.example.com", * password: "avoid-plaintext-passwords", * username: "Admin", * }, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import FSx Storage Virtual Machine using the `id`. For example: * * ```sh * $ pulumi import aws:fsx/ontapStorageVirtualMachine:OntapStorageVirtualMachine example svm-12345678abcdef123 * ``` * Certain resource arguments, like `svm_admin_password` and the `self_managed_active_directory` configuation block `password`, do not have a FSx API method for reading the information after creation. If these arguments are set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignore_changes` to hide the difference. For example: */ class OntapStorageVirtualMachine extends pulumi.CustomResource { /** * Get an existing OntapStorageVirtualMachine 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 OntapStorageVirtualMachine(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of OntapStorageVirtualMachine. 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'] === OntapStorageVirtualMachine.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["activeDirectoryConfiguration"] = state?.activeDirectoryConfiguration; resourceInputs["arn"] = state?.arn; resourceInputs["endpoints"] = state?.endpoints; resourceInputs["fileSystemId"] = state?.fileSystemId; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["rootVolumeSecurityStyle"] = state?.rootVolumeSecurityStyle; resourceInputs["subtype"] = state?.subtype; resourceInputs["svmAdminPassword"] = state?.svmAdminPassword; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["uuid"] = state?.uuid; } else { const args = argsOrState; if (args?.fileSystemId === undefined && !opts.urn) { throw new Error("Missing required property 'fileSystemId'"); } resourceInputs["activeDirectoryConfiguration"] = args?.activeDirectoryConfiguration; resourceInputs["fileSystemId"] = args?.fileSystemId; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["rootVolumeSecurityStyle"] = args?.rootVolumeSecurityStyle; resourceInputs["svmAdminPassword"] = args?.svmAdminPassword ? pulumi.secret(args.svmAdminPassword) : undefined; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["endpoints"] = undefined /*out*/; resourceInputs["subtype"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["uuid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["svmAdminPassword"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(OntapStorageVirtualMachine.__pulumiType, name, resourceInputs, opts); } } exports.OntapStorageVirtualMachine = OntapStorageVirtualMachine; /** @internal */ OntapStorageVirtualMachine.__pulumiType = 'aws:fsx/ontapStorageVirtualMachine:OntapStorageVirtualMachine'; //# sourceMappingURL=ontapStorageVirtualMachine.js.map