GetCluster

Provides details about a specific redshift cluster.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var testCluster = Output.Create(Aws.RedShift.GetCluster.InvokeAsync(new Aws.RedShift.GetClusterArgs
        {
            ClusterIdentifier = "test-cluster",
        }));
        var testStream = new Aws.Kinesis.FirehoseDeliveryStream("testStream", new Aws.Kinesis.FirehoseDeliveryStreamArgs
        {
            Destination = "redshift",
            RedshiftConfiguration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamRedshiftConfigurationArgs
            {
                ClusterJdbcurl = Output.Tuple(testCluster, testCluster).Apply(values =>
                {
                    var testCluster = values.Item1;
                    var testCluster1 = values.Item2;
                    return $"jdbc:redshift://{testCluster.Endpoint}/{testCluster1.DatabaseName}";
                }),
                CopyOptions = "delimiter '|'",
                DataTableColumns = "test-col",
                DataTableName = "test-table",
                Password = "T3stPass",
                RoleArn = aws_iam_role.Firehose_role.Arn,
                Username = "testuser",
            },
            S3Configuration = new Aws.Kinesis.Inputs.FirehoseDeliveryStreamS3ConfigurationArgs
            {
                BucketArn = aws_s3_bucket.Bucket.Arn,
                BufferInterval = 400,
                BufferSize = 10,
                CompressionFormat = "GZIP",
                RoleArn = aws_iam_role.Firehose_role.Arn,
            },
        });
    }

}
package main

import (
    "fmt"

    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/kinesis"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/redshift"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        testCluster, err := redshift.LookupCluster(ctx, &redshift.LookupClusterArgs{
            ClusterIdentifier: "test-cluster",
        }, nil)
        if err != nil {
            return err
        }
        _, err = kinesis.NewFirehoseDeliveryStream(ctx, "testStream", &kinesis.FirehoseDeliveryStreamArgs{
            Destination: pulumi.String("redshift"),
            RedshiftConfiguration: &kinesis.FirehoseDeliveryStreamRedshiftConfigurationArgs{
                ClusterJdbcurl:   pulumi.String(fmt.Sprintf("%v%v%v%v", "jdbc:redshift://", testCluster.Endpoint, "/", testCluster.DatabaseName)),
                CopyOptions:      pulumi.String("delimiter '|'"),
                DataTableColumns: pulumi.String("test-col"),
                DataTableName:    pulumi.String("test-table"),
                Password:         pulumi.String("T3stPass"),
                RoleArn:          pulumi.String(aws_iam_role.Firehose_role.Arn),
                Username:         pulumi.String("testuser"),
            },
            S3Configuration: &kinesis.FirehoseDeliveryStreamS3ConfigurationArgs{
                BucketArn:         pulumi.String(aws_s3_bucket.Bucket.Arn),
                BufferInterval:    pulumi.Int(400),
                BufferSize:        pulumi.Int(10),
                CompressionFormat: pulumi.String("GZIP"),
                RoleArn:           pulumi.String(aws_iam_role.Firehose_role.Arn),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

test_cluster = aws.redshift.get_cluster(cluster_identifier="test-cluster")
test_stream = aws.kinesis.FirehoseDeliveryStream("testStream",
    destination="redshift",
    redshift_configuration={
        "clusterJdbcurl": f"jdbc:redshift://{test_cluster.endpoint}/{test_cluster.database_name}",
        "copyOptions": "delimiter '|'",
        "dataTableColumns": "test-col",
        "dataTableName": "test-table",
        "password": "T3stPass",
        "role_arn": aws_iam_role["firehose_role"]["arn"],
        "username": "testuser",
    },
    s3_configuration={
        "bucketArn": aws_s3_bucket["bucket"]["arn"],
        "bufferInterval": 400,
        "bufferSize": 10,
        "compressionFormat": "GZIP",
        "role_arn": aws_iam_role["firehose_role"]["arn"],
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const testCluster = pulumi.output(aws.redshift.getCluster({
    clusterIdentifier: "test-cluster",
}, { async: true }));
const testStream = new aws.kinesis.FirehoseDeliveryStream("test_stream", {
    destination: "redshift",
    redshiftConfiguration: {
        clusterJdbcurl: pulumi.interpolate`jdbc:redshift://${testCluster.endpoint}/${testCluster.databaseName}`,
        copyOptions: "delimiter '|'", // the default delimiter
        dataTableColumns: "test-col",
        dataTableName: "test-table",
        password: "T3stPass",
        roleArn: aws_iam_role_firehose_role.arn,
        username: "testuser",
    },
    s3Configuration: {
        bucketArn: aws_s3_bucket_bucket.arn,
        bufferInterval: 400,
        bufferSize: 10,
        compressionFormat: "GZIP",
        roleArn: aws_iam_role_firehose_role.arn,
    },
});

Using GetCluster

function getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
function  get_cluster(cluster_identifier=None, tags=None, opts=None)
func LookupCluster(ctx *Context, args *LookupClusterArgs, opts ...InvokeOption) (*LookupClusterResult, error)

Note: This function is named LookupCluster in the Go SDK.

public static class GetCluster {
    public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ClusterIdentifier string

The cluster identifier

Tags Dictionary<string, string>

The tags associated to the cluster

ClusterIdentifier string

The cluster identifier

Tags map[string]string

The tags associated to the cluster

clusterIdentifier string

The cluster identifier

tags {[key: string]: string}

The tags associated to the cluster

cluster_identifier str

The cluster identifier

tags Dict[str, str]

The tags associated to the cluster

GetCluster Result

The following output properties are available:

AllowVersionUpgrade bool

Whether major version upgrades can be applied during maintenance period

AutomatedSnapshotRetentionPeriod int

The backup retention period

AvailabilityZone string

The availability zone of the cluster

BucketName string

The name of the S3 bucket where the log files are to be stored

ClusterIdentifier string

The cluster identifier

ClusterParameterGroupName string

The name of the parameter group to be associated with this cluster

ClusterPublicKey string

The public key for the cluster

ClusterRevisionNumber string

The cluster revision number

ClusterSecurityGroups List<string>

The security groups associated with the cluster

ClusterSubnetGroupName string

The name of a cluster subnet group to be associated with this cluster

ClusterType string

The cluster type

ClusterVersion string
DatabaseName string

The name of the default database in the cluster

ElasticIp string

The Elastic IP of the cluster

EnableLogging bool

Whether cluster logging is enabled

Encrypted bool

Whether the cluster data is encrypted

Endpoint string

The cluster endpoint

EnhancedVpcRouting bool

Whether enhanced VPC routing is enabled

IamRoles List<string>

The IAM roles associated to the cluster

Id string

The provider-assigned unique ID for this managed resource.

KmsKeyId string

The KMS encryption key associated to the cluster

MasterUsername string

Username for the master DB user

NodeType string

The cluster node type

NumberOfNodes int

The number of nodes in the cluster

Port int

The port the cluster responds on

PreferredMaintenanceWindow string

The maintenance window

PubliclyAccessible bool

Whether the cluster is publicly accessible

S3KeyPrefix string

The folder inside the S3 bucket where the log files are stored

VpcId string

The VPC Id associated with the cluster

VpcSecurityGroupIds List<string>

The VPC security group Ids associated with the cluster

Tags Dictionary<string, string>

The tags associated to the cluster

AllowVersionUpgrade bool

Whether major version upgrades can be applied during maintenance period

AutomatedSnapshotRetentionPeriod int

The backup retention period

AvailabilityZone string

The availability zone of the cluster

BucketName string

The name of the S3 bucket where the log files are to be stored

ClusterIdentifier string

The cluster identifier

ClusterParameterGroupName string

The name of the parameter group to be associated with this cluster

ClusterPublicKey string

The public key for the cluster

ClusterRevisionNumber string

The cluster revision number

ClusterSecurityGroups []string

The security groups associated with the cluster

ClusterSubnetGroupName string

The name of a cluster subnet group to be associated with this cluster

ClusterType string

The cluster type

ClusterVersion string
DatabaseName string

The name of the default database in the cluster

ElasticIp string

The Elastic IP of the cluster

EnableLogging bool

Whether cluster logging is enabled

Encrypted bool

Whether the cluster data is encrypted

Endpoint string

The cluster endpoint

EnhancedVpcRouting bool

Whether enhanced VPC routing is enabled

IamRoles []string

The IAM roles associated to the cluster

Id string

The provider-assigned unique ID for this managed resource.

KmsKeyId string

The KMS encryption key associated to the cluster

MasterUsername string

Username for the master DB user

NodeType string

The cluster node type

NumberOfNodes int

The number of nodes in the cluster

Port int

The port the cluster responds on

PreferredMaintenanceWindow string

The maintenance window

PubliclyAccessible bool

Whether the cluster is publicly accessible

S3KeyPrefix string

The folder inside the S3 bucket where the log files are stored

VpcId string

The VPC Id associated with the cluster

VpcSecurityGroupIds []string

The VPC security group Ids associated with the cluster

Tags map[string]string

The tags associated to the cluster

allowVersionUpgrade boolean

Whether major version upgrades can be applied during maintenance period

automatedSnapshotRetentionPeriod number

The backup retention period

availabilityZone string

The availability zone of the cluster

bucketName string

The name of the S3 bucket where the log files are to be stored

clusterIdentifier string

The cluster identifier

clusterParameterGroupName string

The name of the parameter group to be associated with this cluster

clusterPublicKey string

The public key for the cluster

clusterRevisionNumber string

The cluster revision number

clusterSecurityGroups string[]

The security groups associated with the cluster

clusterSubnetGroupName string

The name of a cluster subnet group to be associated with this cluster

clusterType string

The cluster type

clusterVersion string
databaseName string

The name of the default database in the cluster

elasticIp string

The Elastic IP of the cluster

enableLogging boolean

Whether cluster logging is enabled

encrypted boolean

Whether the cluster data is encrypted

endpoint string

The cluster endpoint

enhancedVpcRouting boolean

Whether enhanced VPC routing is enabled

iamRoles string[]

The IAM roles associated to the cluster

id string

The provider-assigned unique ID for this managed resource.

kmsKeyId string

The KMS encryption key associated to the cluster

masterUsername string

Username for the master DB user

nodeType string

The cluster node type

numberOfNodes number

The number of nodes in the cluster

port number

The port the cluster responds on

preferredMaintenanceWindow string

The maintenance window

publiclyAccessible boolean

Whether the cluster is publicly accessible

s3KeyPrefix string

The folder inside the S3 bucket where the log files are stored

vpcId string

The VPC Id associated with the cluster

vpcSecurityGroupIds string[]

The VPC security group Ids associated with the cluster

tags {[key: string]: string}

The tags associated to the cluster

allow_version_upgrade bool

Whether major version upgrades can be applied during maintenance period

automated_snapshot_retention_period float

The backup retention period

availability_zone str

The availability zone of the cluster

bucket_name str

The name of the S3 bucket where the log files are to be stored

cluster_identifier str

The cluster identifier

cluster_parameter_group_name str

The name of the parameter group to be associated with this cluster

cluster_public_key str

The public key for the cluster

cluster_revision_number str

The cluster revision number

cluster_security_groups List[str]

The security groups associated with the cluster

cluster_subnet_group_name str

The name of a cluster subnet group to be associated with this cluster

cluster_type str

The cluster type

cluster_version str
database_name str

The name of the default database in the cluster

elastic_ip str

The Elastic IP of the cluster

enable_logging bool

Whether cluster logging is enabled

encrypted bool

Whether the cluster data is encrypted

endpoint str

The cluster endpoint

enhanced_vpc_routing bool

Whether enhanced VPC routing is enabled

iam_roles List[str]

The IAM roles associated to the cluster

id str

The provider-assigned unique ID for this managed resource.

kms_key_id str

The KMS encryption key associated to the cluster

master_username str

Username for the master DB user

node_type str

The cluster node type

number_of_nodes float

The number of nodes in the cluster

port float

The port the cluster responds on

preferred_maintenance_window str

The maintenance window

publicly_accessible bool

Whether the cluster is publicly accessible

s3_key_prefix str

The folder inside the S3 bucket where the log files are stored

vpc_id str

The VPC Id associated with the cluster

vpc_security_group_ids List[str]

The VPC security group Ids associated with the cluster

tags Dict[str, str]

The tags associated to the cluster

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.