Skip to content

Data Source: awsRedshiftCluster

Provides details about a specific redshift cluster.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsRedshiftClusterExample =
  new aws.dataAwsRedshiftCluster.DataAwsRedshiftCluster(this, "example", {
    clusterIdentifier: "example-cluster",
  });
new aws.kinesisFirehoseDeliveryStream.KinesisFirehoseDeliveryStream(
  this,
  "example_stream",
  {
    destination: "redshift",
    name: "terraform-kinesis-firehose-example-stream",
    redshiftConfiguration: {
      clusterJdbcurl: `jdbc:redshift://\${${dataAwsRedshiftClusterExample.endpoint}}/\${${dataAwsRedshiftClusterExample.databaseName}}`,
      copyOptions: "delimiter '|'",
      dataTableColumns: "example-col",
      dataTableName: "example-table",
      password: "Exampl3Pass",
      roleArn: "${aws_iam_role.firehose_role.arn}",
      username: "exampleuser",
    },
    s3Configuration: {
      bucketArn: "${aws_s3_bucket.bucket.arn}",
      bufferInterval: 400,
      bufferSize: 10,
      compressionFormat: "GZIP",
      roleArn: "${aws_iam_role.firehose_role.arn}",
    },
  }
);

Argument Reference

The following arguments are supported:

  • clusterIdentifier - (Required) Cluster identifier

Attribute Reference

In addition to all arguments above, the following attributes are exported:

  • arn - ARN of cluster.
  • allowVersionUpgrade - Whether major version upgrades can be applied during maintenance period
  • automatedSnapshotRetentionPeriod - The backup retention period
  • aquaConfigurationStatus - The value represents how the cluster is configured to use AQUA.
  • availabilityZone - Availability zone of the cluster
  • availabilityZoneRelocationEnabled - Indicates whether the cluster is able to be relocated to another availability zone.
  • bucketName - Name of the S3 bucket where the log files are to be stored
  • clusterIdentifier - Cluster identifier
  • clusterNodes - Nodes in the cluster. Cluster node blocks are documented below
  • clusterParameterGroupName - The name of the parameter group to be associated with this cluster
  • clusterPublicKey - Public key for the cluster
  • clusterRevisionNumber - The cluster revision number
  • clusterSecurityGroups - The security groups associated with the cluster
  • clusterSubnetGroupName - The name of a cluster subnet group to be associated with this cluster
  • clusterType - Cluster type
  • databaseName - Name of the default database in the cluster
  • defaultIamRoleArn - ∂The ARN for the IAM role that was set as default for the cluster when the cluster was created.
  • elasticIp - Elastic IP of the cluster
  • enableLogging - Whether cluster logging is enabled
  • encrypted - Whether the cluster data is encrypted
  • endpoint - Cluster endpoint
  • enhancedVpcRouting - Whether enhanced VPC routing is enabled
  • iamRoles - IAM roles associated to the cluster
  • kmsKeyId - KMS encryption key associated to the cluster
  • masterUsername - Username for the master DB user
  • nodeType - Cluster node type
  • numberOfNodes - Number of nodes in the cluster
  • maintenanceTrackName - The name of the maintenance track for the restored cluster.
  • manualSnapshotRetentionPeriod - (Optional) The default number of days to retain a manual snapshot.
  • port - Port the cluster responds on
  • preferredMaintenanceWindow - The maintenance window
  • publiclyAccessible - Whether the cluster is publicly accessible
  • s3KeyPrefix - Folder inside the S3 bucket where the log files are stored
  • logDestinationType - The log destination type.
  • logExports - Collection of exported log types. Log types include the connection log, user log and user activity log.
  • tags - Tags associated to the cluster
  • vpcId - VPC Id associated with the cluster
  • vpcSecurityGroupIds - The VPC security group Ids associated with the cluster

Cluster nodes (for clusterNodes) support the following attributes:

  • nodeRole - Whether the node is a leader node or a compute node
  • privateIpAddress - Private IP address of a node within a cluster
  • publicIpAddress - Public IP address of a node within a cluster