UNPKG

@pulumi/aws

Version:

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

198 lines • 10.8 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.Cluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.redshift.Cluster("example", { * clusterIdentifier: "tf-redshift-cluster", * databaseName: "mydb", * masterUsername: "exampleuser", * masterPassword: "Mustbe8characters", * nodeType: "dc1.large", * clusterType: "single-node", * }); * ``` * * ### With Managed Credentials * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.redshift.Cluster("example", { * clusterIdentifier: "tf-redshift-cluster", * databaseName: "mydb", * masterUsername: "exampleuser", * nodeType: "dc1.large", * clusterType: "single-node", * manageMasterPassword: true, * }); * ``` * * ## Import * * Using `pulumi import`, import Redshift Clusters using the `cluster_identifier`. For example: * * ```sh * $ pulumi import aws:redshift/cluster:Cluster myprodcluster tf-redshift-cluster-12345 * ``` */ class Cluster extends pulumi.CustomResource { /** * Get an existing Cluster 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 Cluster(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Cluster. 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'] === Cluster.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["allowVersionUpgrade"] = state?.allowVersionUpgrade; resourceInputs["applyImmediately"] = state?.applyImmediately; resourceInputs["aquaConfigurationStatus"] = state?.aquaConfigurationStatus; resourceInputs["arn"] = state?.arn; resourceInputs["automatedSnapshotRetentionPeriod"] = state?.automatedSnapshotRetentionPeriod; resourceInputs["availabilityZone"] = state?.availabilityZone; resourceInputs["availabilityZoneRelocationEnabled"] = state?.availabilityZoneRelocationEnabled; resourceInputs["clusterIdentifier"] = state?.clusterIdentifier; resourceInputs["clusterNamespaceArn"] = state?.clusterNamespaceArn; resourceInputs["clusterNodes"] = state?.clusterNodes; resourceInputs["clusterParameterGroupName"] = state?.clusterParameterGroupName; resourceInputs["clusterPublicKey"] = state?.clusterPublicKey; resourceInputs["clusterRevisionNumber"] = state?.clusterRevisionNumber; resourceInputs["clusterSubnetGroupName"] = state?.clusterSubnetGroupName; resourceInputs["clusterType"] = state?.clusterType; resourceInputs["clusterVersion"] = state?.clusterVersion; resourceInputs["databaseName"] = state?.databaseName; resourceInputs["defaultIamRoleArn"] = state?.defaultIamRoleArn; resourceInputs["dnsName"] = state?.dnsName; resourceInputs["elasticIp"] = state?.elasticIp; resourceInputs["encrypted"] = state?.encrypted; resourceInputs["endpoint"] = state?.endpoint; resourceInputs["enhancedVpcRouting"] = state?.enhancedVpcRouting; resourceInputs["finalSnapshotIdentifier"] = state?.finalSnapshotIdentifier; resourceInputs["iamRoles"] = state?.iamRoles; resourceInputs["kmsKeyId"] = state?.kmsKeyId; resourceInputs["maintenanceTrackName"] = state?.maintenanceTrackName; resourceInputs["manageMasterPassword"] = state?.manageMasterPassword; resourceInputs["manualSnapshotRetentionPeriod"] = state?.manualSnapshotRetentionPeriod; resourceInputs["masterPassword"] = state?.masterPassword; resourceInputs["masterPasswordSecretArn"] = state?.masterPasswordSecretArn; resourceInputs["masterPasswordSecretKmsKeyId"] = state?.masterPasswordSecretKmsKeyId; resourceInputs["masterPasswordWo"] = state?.masterPasswordWo; resourceInputs["masterPasswordWoVersion"] = state?.masterPasswordWoVersion; resourceInputs["masterUsername"] = state?.masterUsername; resourceInputs["multiAz"] = state?.multiAz; resourceInputs["nodeType"] = state?.nodeType; resourceInputs["numberOfNodes"] = state?.numberOfNodes; resourceInputs["ownerAccount"] = state?.ownerAccount; resourceInputs["port"] = state?.port; resourceInputs["preferredMaintenanceWindow"] = state?.preferredMaintenanceWindow; resourceInputs["publiclyAccessible"] = state?.publiclyAccessible; resourceInputs["region"] = state?.region; resourceInputs["skipFinalSnapshot"] = state?.skipFinalSnapshot; resourceInputs["snapshotArn"] = state?.snapshotArn; resourceInputs["snapshotClusterIdentifier"] = state?.snapshotClusterIdentifier; resourceInputs["snapshotIdentifier"] = state?.snapshotIdentifier; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["vpcSecurityGroupIds"] = state?.vpcSecurityGroupIds; } else { const args = argsOrState; if (args?.clusterIdentifier === undefined && !opts.urn) { throw new Error("Missing required property 'clusterIdentifier'"); } if (args?.nodeType === undefined && !opts.urn) { throw new Error("Missing required property 'nodeType'"); } resourceInputs["allowVersionUpgrade"] = args?.allowVersionUpgrade; resourceInputs["applyImmediately"] = args?.applyImmediately; resourceInputs["aquaConfigurationStatus"] = args?.aquaConfigurationStatus; resourceInputs["automatedSnapshotRetentionPeriod"] = args?.automatedSnapshotRetentionPeriod; resourceInputs["availabilityZone"] = args?.availabilityZone; resourceInputs["availabilityZoneRelocationEnabled"] = args?.availabilityZoneRelocationEnabled; resourceInputs["clusterIdentifier"] = args?.clusterIdentifier; resourceInputs["clusterParameterGroupName"] = args?.clusterParameterGroupName; resourceInputs["clusterSubnetGroupName"] = args?.clusterSubnetGroupName; resourceInputs["clusterType"] = args?.clusterType; resourceInputs["clusterVersion"] = args?.clusterVersion; resourceInputs["databaseName"] = args?.databaseName; resourceInputs["defaultIamRoleArn"] = args?.defaultIamRoleArn; resourceInputs["elasticIp"] = args?.elasticIp; resourceInputs["encrypted"] = args?.encrypted; resourceInputs["enhancedVpcRouting"] = args?.enhancedVpcRouting; resourceInputs["finalSnapshotIdentifier"] = args?.finalSnapshotIdentifier; resourceInputs["iamRoles"] = args?.iamRoles; resourceInputs["kmsKeyId"] = args?.kmsKeyId; resourceInputs["maintenanceTrackName"] = args?.maintenanceTrackName; resourceInputs["manageMasterPassword"] = args?.manageMasterPassword; resourceInputs["manualSnapshotRetentionPeriod"] = args?.manualSnapshotRetentionPeriod; resourceInputs["masterPassword"] = args?.masterPassword ? pulumi.secret(args.masterPassword) : undefined; resourceInputs["masterPasswordSecretKmsKeyId"] = args?.masterPasswordSecretKmsKeyId; resourceInputs["masterPasswordWo"] = args?.masterPasswordWo ? pulumi.secret(args.masterPasswordWo) : undefined; resourceInputs["masterPasswordWoVersion"] = args?.masterPasswordWoVersion; resourceInputs["masterUsername"] = args?.masterUsername; resourceInputs["multiAz"] = args?.multiAz; resourceInputs["nodeType"] = args?.nodeType; resourceInputs["numberOfNodes"] = args?.numberOfNodes; resourceInputs["ownerAccount"] = args?.ownerAccount; resourceInputs["port"] = args?.port; resourceInputs["preferredMaintenanceWindow"] = args?.preferredMaintenanceWindow; resourceInputs["publiclyAccessible"] = args?.publiclyAccessible; resourceInputs["region"] = args?.region; resourceInputs["skipFinalSnapshot"] = args?.skipFinalSnapshot; resourceInputs["snapshotArn"] = args?.snapshotArn; resourceInputs["snapshotClusterIdentifier"] = args?.snapshotClusterIdentifier; resourceInputs["snapshotIdentifier"] = args?.snapshotIdentifier; resourceInputs["tags"] = args?.tags; resourceInputs["vpcSecurityGroupIds"] = args?.vpcSecurityGroupIds; resourceInputs["arn"] = undefined /*out*/; resourceInputs["clusterNamespaceArn"] = undefined /*out*/; resourceInputs["clusterNodes"] = undefined /*out*/; resourceInputs["clusterPublicKey"] = undefined /*out*/; resourceInputs["clusterRevisionNumber"] = undefined /*out*/; resourceInputs["dnsName"] = undefined /*out*/; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["masterPasswordSecretArn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["masterPassword", "masterPasswordWo"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Cluster.__pulumiType, name, resourceInputs, opts); } } exports.Cluster = Cluster; /** @internal */ Cluster.__pulumiType = 'aws:redshift/cluster:Cluster'; //# sourceMappingURL=cluster.js.map