Package com.pulumi.aws.redshift
Class Cluster
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.redshift.Cluster
-
public class Cluster extends com.pulumi.resources.CustomResourceProvides a Redshift Cluster Resource. > **NOTE:** A Redshift cluster's default IAM role can be managed both by this resource's `defaultIamRoleArn` argument and the `aws.redshift.ClusterIamRoles` resource's `defaultIamRoleArn` argument. Do not configure different values for both arguments. Doing so will cause a conflict of default IAM roles. > **Note:** Write-Only argument `masterPasswordWo` is available to use in place of `masterPassword`. Write-Only arguments are supported in HashiCorp Terraform 1.11.0 and later. Learn more. ## Example Usage ### Basic Usage
### With Managed Credentialspackage generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.redshift.Cluster; import com.pulumi.aws.redshift.ClusterArgs; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new Cluster("example", ClusterArgs.builder() .clusterIdentifier("tf-redshift-cluster") .databaseName("mydb") .masterUsername("exampleuser") .masterPassword("Mustbe8characters") .nodeType("dc1.large") .clusterType("single-node") .build()); } }
## Import Using `pulumi import`, import Redshift Clusters using the `clusterIdentifier`. For example: ```sh $ pulumi import aws:redshift/cluster:Cluster myprodcluster tf-redshift-cluster-12345 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.redshift.Cluster; import com.pulumi.aws.redshift.ClusterArgs; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new Cluster("example", ClusterArgs.builder() .clusterIdentifier("tf-redshift-cluster") .databaseName("mydb") .masterUsername("exampleuser") .nodeType("dc1.large") .clusterType("single-node") .manageMasterPassword(true) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description Cluster(java.lang.String name)Cluster(java.lang.String name, ClusterArgs args)Cluster(java.lang.String name, ClusterArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>allowVersionUpgrade()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>applyImmediately()com.pulumi.core.Output<java.lang.String>aquaConfigurationStatus()com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>automatedSnapshotRetentionPeriod()com.pulumi.core.Output<java.lang.String>availabilityZone()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>availabilityZoneRelocationEnabled()com.pulumi.core.Output<java.lang.String>clusterIdentifier()com.pulumi.core.Output<java.lang.String>clusterNamespaceArn()com.pulumi.core.Output<java.util.List<ClusterClusterNode>>clusterNodes()com.pulumi.core.Output<java.lang.String>clusterParameterGroupName()com.pulumi.core.Output<java.lang.String>clusterPublicKey()com.pulumi.core.Output<java.lang.String>clusterRevisionNumber()com.pulumi.core.Output<java.lang.String>clusterSubnetGroupName()com.pulumi.core.Output<java.lang.String>clusterType()com.pulumi.core.Output<java.util.Optional<java.lang.String>>clusterVersion()com.pulumi.core.Output<java.lang.String>databaseName()com.pulumi.core.Output<java.lang.String>defaultIamRoleArn()com.pulumi.core.Output<java.lang.String>dnsName()com.pulumi.core.Output<java.util.Optional<java.lang.String>>elasticIp()com.pulumi.core.Output<java.util.Optional<java.lang.String>>encrypted()com.pulumi.core.Output<java.lang.String>endpoint()com.pulumi.core.Output<java.lang.Boolean>enhancedVpcRouting()com.pulumi.core.Output<java.util.Optional<java.lang.String>>finalSnapshotIdentifier()static Clusterget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ClusterState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.List<java.lang.String>>iamRoles()com.pulumi.core.Output<java.lang.String>kmsKeyId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>maintenanceTrackName()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>manageMasterPassword()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>manualSnapshotRetentionPeriod()com.pulumi.core.Output<java.util.Optional<java.lang.String>>masterPassword()com.pulumi.core.Output<java.lang.String>masterPasswordSecretArn()com.pulumi.core.Output<java.lang.String>masterPasswordSecretKmsKeyId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>masterPasswordWo()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>masterPasswordWoVersion()com.pulumi.core.Output<java.util.Optional<java.lang.String>>masterUsername()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>multiAz()com.pulumi.core.Output<java.lang.String>nodeType()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>numberOfNodes()com.pulumi.core.Output<java.util.Optional<java.lang.String>>ownerAccount()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>port()com.pulumi.core.Output<java.lang.String>preferredMaintenanceWindow()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>publiclyAccessible()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>skipFinalSnapshot()com.pulumi.core.Output<java.util.Optional<java.lang.String>>snapshotArn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>snapshotClusterIdentifier()com.pulumi.core.Output<java.util.Optional<java.lang.String>>snapshotIdentifier()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.util.List<java.lang.String>>vpcSecurityGroupIds()
-
-
-
Constructor Detail
-
Cluster
public Cluster(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Cluster
public Cluster(java.lang.String name, ClusterArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Cluster
public Cluster(java.lang.String name, ClusterArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
allowVersionUpgrade
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> allowVersionUpgrade()
- Returns:
- If true , major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. Default is `true`.
-
applyImmediately
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> applyImmediately()
- Returns:
- Specifies whether any cluster modifications are applied immediately, or during the next maintenance window. Default is `false`.
-
aquaConfigurationStatus
public com.pulumi.core.Output<java.lang.String> aquaConfigurationStatus()
- Returns:
- The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored. No longer supported by the AWS API. Always returns `auto`.
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of cluster
-
automatedSnapshotRetentionPeriod
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> automatedSnapshotRetentionPeriod()
- Returns:
- The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with create-cluster-snapshot. Default is 1.
-
availabilityZone
public com.pulumi.core.Output<java.lang.String> availabilityZone()
- Returns:
- The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency. Can only be changed if `availabilityZoneRelocationEnabled` is `true`.
-
availabilityZoneRelocationEnabled
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> availabilityZoneRelocationEnabled()
- Returns:
- If true, the cluster can be relocated to another availabity zone, either automatically by AWS or when requested. Default is `false`. Available for use on clusters from the RA3 instance family.
-
clusterIdentifier
public com.pulumi.core.Output<java.lang.String> clusterIdentifier()
- Returns:
- The Cluster Identifier. Must be a lower case string.
-
clusterNamespaceArn
public com.pulumi.core.Output<java.lang.String> clusterNamespaceArn()
- Returns:
- Namespace ARN of the cluster
-
clusterNodes
public com.pulumi.core.Output<java.util.List<ClusterClusterNode>> clusterNodes()
- Returns:
- The nodes in the cluster. Cluster node blocks are documented below
-
clusterParameterGroupName
public com.pulumi.core.Output<java.lang.String> clusterParameterGroupName()
- Returns:
- The name of the parameter group to be associated with this cluster.
-
clusterPublicKey
public com.pulumi.core.Output<java.lang.String> clusterPublicKey()
- Returns:
- The public key for the cluster
-
clusterRevisionNumber
public com.pulumi.core.Output<java.lang.String> clusterRevisionNumber()
- Returns:
- The specific revision number of the database in the cluster
-
clusterSubnetGroupName
public com.pulumi.core.Output<java.lang.String> clusterSubnetGroupName()
- Returns:
- Name of a cluster subnet group to be associated with this cluster. If this parameter is not provided the resulting cluster will be deployed outside VPC.
-
clusterType
public com.pulumi.core.Output<java.lang.String> clusterType()
- Returns:
- The cluster type to use. Either `single-node` or `multi-node`.
-
clusterVersion
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> clusterVersion()
- Returns:
- The version of the Amazon Redshift engine software that you want to deploy on the cluster. The version selected runs on all the nodes in the cluster.
-
databaseName
public com.pulumi.core.Output<java.lang.String> databaseName()
- Returns:
- The name of the first database to be created when the cluster is created. If you do not provide a name, Amazon Redshift will create a default database called `dev`.
-
defaultIamRoleArn
public com.pulumi.core.Output<java.lang.String> defaultIamRoleArn()
- Returns:
- ARN for the IAM role that was set as default for the cluster when the cluster was created.
-
dnsName
public com.pulumi.core.Output<java.lang.String> dnsName()
- Returns:
- The DNS name of the cluster
-
elasticIp
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> elasticIp()
- Returns:
- The Elastic IP (EIP) address for the cluster.
-
encrypted
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> encrypted()
- Returns:
- If true , the data in the cluster is encrypted at rest. Default is `true`.
-
endpoint
public com.pulumi.core.Output<java.lang.String> endpoint()
- Returns:
- The connection endpoint
-
enhancedVpcRouting
public com.pulumi.core.Output<java.lang.Boolean> enhancedVpcRouting()
- Returns:
- If true , enhanced VPC routing is enabled.
-
finalSnapshotIdentifier
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> finalSnapshotIdentifier()
- Returns:
- The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, `skipFinalSnapshot` must be false.
-
iamRoles
public com.pulumi.core.Output<java.util.List<java.lang.String>> iamRoles()
- Returns:
- A list of IAM Role ARNs to associate with the cluster. A maximum of 50 (or 10 in ISO regions) can be associated with the cluster at any time.
-
kmsKeyId
public com.pulumi.core.Output<java.lang.String> kmsKeyId()
- Returns:
- The ARN for the KMS encryption key. When specifying `kmsKeyId`, `encrypted` needs to be set to true.
-
maintenanceTrackName
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> maintenanceTrackName()
- Returns:
- The name of the maintenance track for the restored cluster. When you take a snapshot, the snapshot inherits the MaintenanceTrack value from the cluster. The snapshot might be on a different track than the cluster that was the source for the snapshot. For example, suppose that you take a snapshot of a cluster that is on the current track and then change the cluster to be on the trailing track. In this case, the snapshot and the source cluster are on different tracks. Default value is `current`.
-
manageMasterPassword
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> manageMasterPassword()
- Returns:
- Whether to use AWS SecretsManager to manage the cluster admin credentials. Conflicts with `masterPassword` and `masterPasswordWo`. One of `masterPassword` or `manageMasterPassword` is required unless `snapshotIdentifier` is provided.
-
manualSnapshotRetentionPeriod
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> manualSnapshotRetentionPeriod()
- Returns:
- The default number of days to retain a manual snapshot. If the value is -1, the snapshot is retained indefinitely. This setting doesn't change the retention period of existing snapshots. Valid values are between `-1` and `3653`. Default value is `-1`.
-
masterPassword
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> masterPassword()
- Returns:
- Password for the master DB user. Conflicts with `manageMasterPassword` and `masterPasswordWo`. One of `masterPassword`, `masterPasswordWo` or `manageMasterPassword` is required unless `snapshotIdentifier` is provided. Note that this will show up in logs, and it will be stored in the state file. Password must contain at least 8 characters and contain at least one uppercase letter, one lowercase letter, and one number.
-
masterPasswordSecretArn
public com.pulumi.core.Output<java.lang.String> masterPasswordSecretArn()
- Returns:
- ARN of the cluster admin credentials secret
-
masterPasswordSecretKmsKeyId
public com.pulumi.core.Output<java.lang.String> masterPasswordSecretKmsKeyId()
- Returns:
- ID of the KMS key used to encrypt the cluster admin credentials secret.
-
masterPasswordWo
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> masterPasswordWo()
- Returns:
- **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. Password for the master DB user. Conflicts with `manageMasterPassword` and `masterPassword`. One of `masterPasswordWo`, `masterPassword` or `manageMasterPassword` is required unless `snapshotIdentifier` is provided. Note that this may show up in logs. Password must contain at least 8 characters and contain at least one uppercase letter, one lowercase letter, and one number. If set, requires `masterPasswordWoVersion` to be set.
-
masterPasswordWoVersion
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> masterPasswordWoVersion()
- Returns:
- Required when `masterPasswordWo` is set. Changing this value triggers an update to `masterPasswordWo`.
-
masterUsername
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> masterUsername()
- Returns:
- Username for the master DB user.
-
multiAz
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> multiAz()
- Returns:
- Specifies if the Redshift cluster is multi-AZ.
-
nodeType
public com.pulumi.core.Output<java.lang.String> nodeType()
- Returns:
- The node type to be provisioned for the cluster.
-
numberOfNodes
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> numberOfNodes()
- Returns:
- The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node. Default is 1.
-
ownerAccount
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> ownerAccount()
- Returns:
- The AWS customer account used to create or copy the snapshot. Required if you are restoring a snapshot you do not own, optional if you own the snapshot.
-
port
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> port()
- Returns:
- The port number on which the cluster accepts incoming connections. Valid values are between `1115` and `65535`. The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections. Default port is `5439`.
-
preferredMaintenanceWindow
public com.pulumi.core.Output<java.lang.String> preferredMaintenanceWindow()
- Returns:
- The weekly time range (in UTC) during which automated cluster maintenance can occur. Format: ddd:hh24:mi-ddd:hh24:mi
-
publiclyAccessible
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> publiclyAccessible()
- Returns:
- If true, the cluster can be accessed from a public network. Default is `false`.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
skipFinalSnapshot
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> skipFinalSnapshot()
- Returns:
- Determines whether a final snapshot of the cluster is created before Amazon Redshift deletes the cluster. If true , a final cluster snapshot is not created. If false , a final cluster snapshot is created before the cluster is deleted. Default is false.
-
snapshotArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotArn()
- Returns:
- The ARN of the snapshot from which to create the new cluster. Conflicts with `snapshotIdentifier`.
-
snapshotClusterIdentifier
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotClusterIdentifier()
- Returns:
- The name of the cluster the source snapshot was created from.
-
snapshotIdentifier
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> snapshotIdentifier()
- Returns:
- The name of the snapshot from which to create the new cluster. Conflicts with `snapshotArn`.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. For more detailed documentation about each argument, refer to the [AWS official documentation](http://docs.aws.amazon.com/cli/latest/reference/redshift/index.html#cli-aws-redshift).
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
vpcSecurityGroupIds
public com.pulumi.core.Output<java.util.List<java.lang.String>> vpcSecurityGroupIds()
- Returns:
- List of VPC security groups to be associated with the cluster.
-
get
public static Cluster get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ClusterState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-