github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/aws/r/redshift_cluster.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_redshift_cluster"
     4  sidebar_current: "docs-aws-resource-redshift-cluster"
     5  ---
     6  
     7  # aws\_redshift\_cluster
     8  
     9  Provides a Redshift Cluster Resource.
    10  
    11  ## Example Usage
    12  
    13  ```
    14  resource "aws_redshift_cluster" "default" {
    15    cluster_identifier = "tf-redshift-cluster"
    16    database_name      = "mydb"
    17    master_username    = "foo"
    18    master_password    = "Mustbe8characters"
    19    node_type          = "dc1.large"
    20    cluster_type       = "single-node"
    21  }
    22  ```
    23  
    24  ## Argument Reference
    25  
    26  For more detailed documentation about each argument, refer to
    27  the [AWS official documentation](http://docs.aws.amazon.com/cli/latest/reference/redshift/index.html#cli-aws-redshift).
    28  
    29  The following arguments are supported:
    30  
    31  * `cluster_identifier` - (Required) The Cluster Identifier. Must be a lower case
    32  string.
    33  * `database_name` - (Optional) The name of the first database to be created when the cluster is created.
    34   If you do not provide a name, Amazon Redshift will create a default database called `dev`.
    35  * `node_type` - (Required) The node type to be provisioned for the cluster.
    36  * `cluster_type` - (Optional) The cluster type to use. Either `single-node` or `multi-node`.
    37  * `master_password` - (Required unless a `snapshot_identifier` is provided) Password for the master DB user.
    38      Note that this may show up in logs, and it will be stored in the state file. Password must contain at least 8 chars and
    39      contain at least one uppercase letter, one lowercase letter, and one number.
    40  * `master_username` - (Required unless a `snapshot_identifier` is provided) Username for the master DB user.
    41  
    42  * `cluster_security_groups` - (Optional) A list of security groups to be associated with this cluster.
    43  * `vpc_security_group_ids` - (Optional) A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.
    44  * `cluster_subnet_group_name` - (Optional) The 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 virtual private cloud (VPC).
    45  * `availability_zone` - (Optional) 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.
    46  * `preferred_maintenance_window` - (Optional) The weekly time range (in UTC) during which automated cluster maintenance can occur.
    47                                                Format: ddd:hh24:mi-ddd:hh24:mi
    48  * `cluster_parameter_group_name` - (Optional) The name of the parameter group to be associated with this cluster.
    49  * `automated_snapshot_retention_period` - (Optional) 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.
    50  * `port` - (Optional) The port number on which the cluster accepts incoming connections.
    51                        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.
    52  * `cluster_version` - (Optional) The version of the Amazon Redshift engine software that you want to deploy on the cluster.
    53                                   The version selected runs on all the nodes in the cluster.
    54  * `allow_version_upgrade` - (Optional) 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
    55  * `number_of_nodes` - (Optional) The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node. Default is 1.
    56  * `publicly_accessible` - (Optional) If true, the cluster can be accessed from a public network. Default is `true`.
    57  * `encrypted` - (Optional) If true , the data in the cluster is encrypted at rest.
    58  * `enhanced_vpc_routing` - (Optional) If true , enhanced VPC routing is enabled.
    59  * `kms_key_id` - (Optional) The ARN for the KMS encryption key. When specifying `kms_key_id`, `encrypted` needs to be set to true.
    60  * `elastic_ip` - (Optional) The Elastic IP (EIP) address for the cluster.
    61  * `skip_final_snapshot` - (Optional) 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 true.
    62  * `final_snapshot_identifier` - (Optional) The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, `skip_final_snapshot` must be false.
    63  * `snapshot_identifier` - (Optional) The name of the snapshot from which to create the new cluster.
    64  * `snapshot_cluster_identifier` - (Optional) The name of the cluster the source snapshot was created from.
    65  * `owner_account` - (Optional) 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.
    66  * `iam_roles` - (Optional) A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time.
    67  * `enable_logging` - (Optional) Enables logging information such as queries and connection attempts, for the specified Amazon Redshift cluster. Defaults to `false`.
    68  * `bucket_name` - (Optional, required when `enable_logging` is `true`) The name of an existing S3 bucket where the log files are to be stored. Must be in the same region as the cluster and the cluster must have read bucket and put object permissions.
    69  For more information on the permissions required for the bucket, please read the AWS [documentation](http://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html#db-auditing-enable-logging)
    70  * `s3_key_prefix` - (Optional) The prefix applied to the log file names.
    71  * `tags` - (Optional) A mapping of tags to assign to the resource.
    72  
    73  
    74  ## Attributes Reference
    75  
    76  The following attributes are exported:
    77  
    78  * `id` - The Redshift Cluster ID.
    79  * `cluster_identifier` - The Cluster Identifier
    80  * `cluster_type` - The cluster type
    81  * `node_type` - The type of nodes in the cluster
    82  * `database_name` - The name of the default database in the Cluster
    83  * `availability_zone` - The availability zone of the Cluster
    84  * `automated_snapshot_retention_period` - The backup retention period
    85  * `preferred_maintenance_window` - The backup window
    86  * `endpoint` - The connection endpoint
    87  * `encrypted` - Whether the data in the cluster is encrypted
    88  * `cluster_security_groups` - The security groups associated with the cluster
    89  * `vpc_security_group_ids` - The VPC security group Ids associated with the cluster
    90  * `port` - The Port the cluster responds on
    91  * `cluster_version` - The version of Redshift engine software
    92  * `cluster_parameter_group_name` - The name of the parameter group to be associated with this cluster
    93  * `cluster_subnet_group_name` - The name of a cluster subnet group to be associated with this cluster
    94  * `cluster_public_key` - The public key for the cluster
    95  * `cluster_revision_number` - The specific revision number of the database in the cluster
    96  
    97  ## Import
    98  
    99  Redshift Clusters can be imported using the `cluster_identifier`, e.g.
   100  
   101  ```
   102  $ terraform import aws_redshift_cluster.myprodcluster tf-redshift-cluster-12345
   103  ```