Terraform module which creates Redshift resources on AWS.
These types of resources are supported:
Terraform 0.12. Pin module version to ~> v2.0
. Submit pull-requests to master
branch.
Terraform 0.11. Pin module version to ~> v1.0
. Submit pull-requests to terraform011
branch.
module "redshift" {
source = "terraform-aws-modules/redshift/aws"
version = "~> 2.0"
cluster_identifier = "my-cluster"
cluster_node_type = "dc1.large"
cluster_number_of_nodes = 1
cluster_database_name = "mydb"
cluster_master_username = "mydbuser"
cluster_master_password = "mySecretPassw0rd"
# Group parameters
wlm_json_configuration = "[{\"query_concurrency\": 5}]"
# DB Subnet Group Inputs
subnets = ["subnet-123456", "subnet-654321"]
# IAM Roles
cluster_iam_roles = ["arn:aws:iam::225367859851:role/developer"]
}
- Complete Redshift example creates VPC with Redshift subnet, VPC security group and Redshift cluster itself.
Name | Version |
---|---|
aws | n/a |
Name | Description | Type | Default | Required |
---|---|---|---|---|
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. | bool |
true |
no |
automated_snapshot_retention_period | How long will we retain backups | number |
0 |
no |
cluster_database_name | The name of the database to create | string |
n/a | yes |
cluster_iam_roles | A list of IAM Role ARNs to associate with the cluster. A Maximum of 10 can be associated to the cluster at any time. | list(string) |
[] |
no |
cluster_identifier | Custom name of the cluster | string |
n/a | yes |
cluster_master_password | Password for master user | string |
n/a | yes |
cluster_master_username | Master username | string |
n/a | yes |
cluster_node_type | Node Type of Redshift cluster | string |
n/a | yes |
cluster_number_of_nodes | Number of nodes in the cluster (values greater than 1 will trigger 'cluster_type' of 'multi-node') | number |
3 |
no |
cluster_parameter_group | Parameter group, depends on DB engine used | string |
"redshift-1.0" |
no |
cluster_port | n/a | number |
5439 |
no |
cluster_version | Version of Redshift engine cluster | string |
"1.0" |
no |
enable_logging | Enables logging information such as queries and connection attempts, for the specified Amazon Redshift cluster. | bool |
false |
no |
enable_user_activity_logging | Enable logging of user activity. See https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html | string |
"false" |
no |
encrypted | (Optional) If true , the data in the cluster is encrypted at rest. | bool |
false |
no |
enhanced_vpc_routing | (Optional) If true, enhanced VPC routing is enabled. | bool |
false |
no |
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. | bool |
false |
no |
kms_key_id | (Optional) The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true. | string |
"" |
no |
logging_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. | string |
n/a | yes |
logging_s3_key_prefix | (Optional) The prefix applied to the log file names. | string |
n/a | yes |
parameter_group_name | The name of the parameter group to be associated with this cluster. If not specified new parameter group will be created. | string |
"" |
no |
preferred_maintenance_window | When AWS can run snapshot, can't overlap with maintenance window | string |
"sat:10:00-sat:10:30" |
no |
publicly_accessible | Determines if Cluster can be publicly available (NOT recommended) | bool |
false |
no |
redshift_subnet_group_name | The name of a cluster subnet group to be associated with this cluster. If not specified, new subnet will be created. | string |
"" |
no |
require_ssl | Require SSL to connect to this cluster | string |
"false" |
no |
skip_final_snapshot | If true (default), no snapshot will be made before deleting DB | bool |
true |
no |
snapshot_cluster_identifier | (Optional) The name of the cluster the source snapshot was created from. | string |
n/a | yes |
snapshot_identifier | (Optional) The name of the snapshot from which to create the new cluster. | string |
n/a | yes |
subnets | List of subnets DB should be available at. It might be one subnet. | list(string) |
[] |
no |
tags | A mapping of tags to assign to all resources | map(string) |
{} |
no |
use_fips_ssl | Enable FIPS-compliant SSL mode only if your system is required to be FIPS compliant. | string |
"false" |
no |
vpc_security_group_ids | A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster. | list(string) |
n/a | yes |
wlm_json_configuration | Configuration bits for WLM json. see https://docs.aws.amazon.com/redshift/latest/mgmt/workload-mgmt-config.html | string |
"[{\"query_concurrency\": 5}]" |
no |
Name | Description |
---|---|
this_redshift_cluster_arn | The Redshift cluster ARN |
this_redshift_cluster_automated_snapshot_retention_period | The backup retention period |
this_redshift_cluster_availability_zone | The availability zone of the Cluster |
this_redshift_cluster_database_name | The name of the default database in the Cluster |
this_redshift_cluster_encrypted | Whether the data in the cluster is encrypted |
this_redshift_cluster_endpoint | The connection endpoint |
this_redshift_cluster_hostname | The hostname of the Redshift cluster |
this_redshift_cluster_id | The Redshift cluster ID |
this_redshift_cluster_identifier | The Redshift cluster identifier |
this_redshift_cluster_node_type | The type of nodes in the cluster |
this_redshift_cluster_parameter_group_name | The name of the parameter group to be associated with this cluster |
this_redshift_cluster_port | The port the cluster responds on |
this_redshift_cluster_preferred_maintenance_window | The backup window |
this_redshift_cluster_public_key | The public key for the cluster |
this_redshift_cluster_revision_number | The specific revision number of the database in the cluster |
this_redshift_cluster_security_groups | The security groups associated with the cluster |
this_redshift_cluster_subnet_group_name | The name of a cluster subnet group to be associated with this cluster |
this_redshift_cluster_type | The Redshift cluster type |
this_redshift_cluster_version | The version of Redshift engine software |
this_redshift_cluster_vpc_security_group_ids | The VPC security group ids associated with the cluster |
this_redshift_parameter_group_id | The ID of Redshift parameter group created by this module |
this_redshift_subnet_group_id | The ID of Redshift subnet group created by this module |
Migrated from terraform-community-modules/tf_aws_redshift
, where it was originally created by Quentin Rousseau and maintained by these awesome contributors.
Module managed by Anton Babenko.
Apache 2 Licensed. See LICENSE for full details.