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
LookupClusterin the Go SDK.
public static class GetCluster {
public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Cluster
Identifier string The cluster identifier
- Dictionary<string, string>
The tags associated to the cluster
- Cluster
Identifier string The cluster identifier
- map[string]string
The tags associated to the cluster
- cluster
Identifier string The cluster identifier
- {[key: string]: string}
The tags associated to the cluster
- cluster_
identifier str The cluster identifier
- Dict[str, str]
The tags associated to the cluster
GetCluster Result
The following output properties are available:
- Allow
Version boolUpgrade Whether major version upgrades can be applied during maintenance period
- Automated
Snapshot intRetention Period The backup retention period
- Availability
Zone string The availability zone of the cluster
- Bucket
Name string The name of the S3 bucket where the log files are to be stored
- Cluster
Identifier string The cluster identifier
- Cluster
Parameter stringGroup Name The name of the parameter group to be associated with this cluster
- Cluster
Public stringKey The public key for the cluster
- Cluster
Revision stringNumber The cluster revision number
- Cluster
Security List<string>Groups The security groups associated with the cluster
- Cluster
Subnet stringGroup Name The name of a cluster subnet group to be associated with this cluster
- Cluster
Type string The cluster type
- Cluster
Version string - Database
Name string The name of the default database in the cluster
- Elastic
Ip string The Elastic IP of the cluster
- Enable
Logging bool Whether cluster logging is enabled
- Encrypted bool
Whether the cluster data is encrypted
- Endpoint string
The cluster endpoint
- Enhanced
Vpc boolRouting Whether enhanced VPC routing is enabled
- Iam
Roles List<string> The IAM roles associated to the cluster
- Id string
The provider-assigned unique ID for this managed resource.
- Kms
Key stringId The KMS encryption key associated to the cluster
- Master
Username string Username for the master DB user
- Node
Type string The cluster node type
- Number
Of intNodes The number of nodes in the cluster
- Port int
The port the cluster responds on
- Preferred
Maintenance stringWindow The maintenance window
- Publicly
Accessible bool Whether the cluster is publicly accessible
- S3Key
Prefix string The folder inside the S3 bucket where the log files are stored
- Vpc
Id string The VPC Id associated with the cluster
- Vpc
Security List<string>Group Ids The VPC security group Ids associated with the cluster
- Dictionary<string, string>
The tags associated to the cluster
- Allow
Version boolUpgrade Whether major version upgrades can be applied during maintenance period
- Automated
Snapshot intRetention Period The backup retention period
- Availability
Zone string The availability zone of the cluster
- Bucket
Name string The name of the S3 bucket where the log files are to be stored
- Cluster
Identifier string The cluster identifier
- Cluster
Parameter stringGroup Name The name of the parameter group to be associated with this cluster
- Cluster
Public stringKey The public key for the cluster
- Cluster
Revision stringNumber The cluster revision number
- Cluster
Security []stringGroups The security groups associated with the cluster
- Cluster
Subnet stringGroup Name The name of a cluster subnet group to be associated with this cluster
- Cluster
Type string The cluster type
- Cluster
Version string - Database
Name string The name of the default database in the cluster
- Elastic
Ip string The Elastic IP of the cluster
- Enable
Logging bool Whether cluster logging is enabled
- Encrypted bool
Whether the cluster data is encrypted
- Endpoint string
The cluster endpoint
- Enhanced
Vpc boolRouting Whether enhanced VPC routing is enabled
- Iam
Roles []string The IAM roles associated to the cluster
- Id string
The provider-assigned unique ID for this managed resource.
- Kms
Key stringId The KMS encryption key associated to the cluster
- Master
Username string Username for the master DB user
- Node
Type string The cluster node type
- Number
Of intNodes The number of nodes in the cluster
- Port int
The port the cluster responds on
- Preferred
Maintenance stringWindow The maintenance window
- Publicly
Accessible bool Whether the cluster is publicly accessible
- S3Key
Prefix string The folder inside the S3 bucket where the log files are stored
- Vpc
Id string The VPC Id associated with the cluster
- Vpc
Security []stringGroup Ids The VPC security group Ids associated with the cluster
- map[string]string
The tags associated to the cluster
- allow
Version booleanUpgrade Whether major version upgrades can be applied during maintenance period
- automated
Snapshot numberRetention Period The backup retention period
- availability
Zone string The availability zone of the cluster
- bucket
Name string The name of the S3 bucket where the log files are to be stored
- cluster
Identifier string The cluster identifier
- cluster
Parameter stringGroup Name The name of the parameter group to be associated with this cluster
- cluster
Public stringKey The public key for the cluster
- cluster
Revision stringNumber The cluster revision number
- cluster
Security string[]Groups The security groups associated with the cluster
- cluster
Subnet stringGroup Name The name of a cluster subnet group to be associated with this cluster
- cluster
Type string The cluster type
- cluster
Version string - database
Name string The name of the default database in the cluster
- elastic
Ip string The Elastic IP of the cluster
- enable
Logging boolean Whether cluster logging is enabled
- encrypted boolean
Whether the cluster data is encrypted
- endpoint string
The cluster endpoint
- enhanced
Vpc booleanRouting Whether enhanced VPC routing is enabled
- iam
Roles string[] The IAM roles associated to the cluster
- id string
The provider-assigned unique ID for this managed resource.
- kms
Key stringId The KMS encryption key associated to the cluster
- master
Username string Username for the master DB user
- node
Type string The cluster node type
- number
Of numberNodes The number of nodes in the cluster
- port number
The port the cluster responds on
- preferred
Maintenance stringWindow The maintenance window
- publicly
Accessible boolean Whether the cluster is publicly accessible
- s3Key
Prefix string The folder inside the S3 bucket where the log files are stored
- vpc
Id string The VPC Id associated with the cluster
- vpc
Security string[]Group Ids The VPC security group Ids associated with the cluster
- {[key: string]: string}
The tags associated to the cluster
- allow_
version_ boolupgrade Whether major version upgrades can be applied during maintenance period
- automated_
snapshot_ floatretention_ period 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_ strgroup_ name The name of the parameter group to be associated with this cluster
- cluster_
public_ strkey The public key for the cluster
- cluster_
revision_ strnumber The cluster revision number
- cluster_
security_ List[str]groups The security groups associated with the cluster
- cluster_
subnet_ strgroup_ name 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_ boolrouting 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_ strid 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_ floatnodes The number of nodes in the cluster
- port float
The port the cluster responds on
- preferred_
maintenance_ strwindow The maintenance window
- publicly_
accessible bool Whether the cluster is publicly accessible
- s3_
key_ strprefix The folder inside the S3 bucket where the log files are stored
- vpc_
id str The VPC Id associated with the cluster
- vpc_
security_ List[str]group_ ids The VPC security group Ids associated with the cluster
- 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
awsTerraform Provider.