Resource: aws_redshift_cluster

Provides a Redshift Cluster Resource.

Example Usage

Basic Usage

resource "aws_redshift_cluster" "example" {
  cluster_identifier = "tf-redshift-cluster"
  database_name      = "mydb"
  master_username    = "exampleuser"
  master_password    = "Mustbe8characters"
  node_type          = "dc1.large"
  cluster_type       = "single-node"
}

With Managed Credentials

resource "aws_redshift_cluster" "example" {
  cluster_identifier = "tf-redshift-cluster"
  database_name      = "mydb"
  master_username    = "exampleuser"
  node_type          = "dc1.large"
  cluster_type       = "single-node"

  manage_master_password = true
}

Argument Reference

For more detailed documentation about each argument, refer to the AWS official documentation.

This resource supports the following arguments:

Nested Blocks

logging

snapshot_copy

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Cluster nodes (for cluster_nodes) support the following attributes:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import Redshift Clusters using the cluster_identifier. For example:

import {
  to = aws_redshift_cluster.myprodcluster
  id = "tf-redshift-cluster-12345"
}

Using terraform import, import Redshift Clusters using the cluster_identifier. For example:

% terraform import aws_redshift_cluster.myprodcluster tf-redshift-cluster-12345