Skip to content

schubergphilis/terraform-aws-mcaf-redshift

Repository files navigation

terraform-aws-mcaf-redshift

Terraform module to setup and manage an AWS Redshift cluster.

Requirements

Name Version
terraform >= 1.2.0
aws >= 5.0.0

Providers

Name Version
aws >= 5.0.0

Modules

Name Source Version
logging_bucket schubergphilis/mcaf-s3/aws ~> 0.14

Resources

Name Type
aws_eip.default resource
aws_redshift_cluster.default resource
aws_redshift_logging.default resource
aws_redshift_parameter_group.default resource
aws_redshift_subnet_group.default resource
aws_security_group.default resource
aws_iam_policy_document.logging data source

Inputs

Name Description Type Default Required
database The name of the first database to be created when the cluster is created string n/a yes
ingress_cidr_blocks List of CIDR blocks that should be allowed access to the Redshift cluster list(string) n/a yes
name The name to identify the cluster by string n/a yes
password Password for the master DB user string n/a yes
username Username for the master DB user string n/a yes
additional_egress_rules n/a
list(object({
description = string
from_port = number
to_port = number
protocol = string
security_group_ids = list(string)
prefix_list_ids = list(string)
}))
[] no
additional_ingress_rules n/a
list(object({
description = string
from_port = number
to_port = number
protocol = string
security_group_ids = list(string)
}))
[] no
automated_snapshot_retention_period The number of days automated snapshots should be retained number 1 no
cluster_type The cluster type to use (either single-node or multi-node) string "single-node" no
egress_cidr_blocks List of CIDR blocks that should be allowed access from the Redshift cluster list(string) [] no
enhanced_vpc_routing If true enhanced VPC routing is enabled bool false no
final_snapshot_identifier Identifier of the final snapshot to create before deleting the cluster string "none" no
force_destroy A boolean that indicates all logging should be deleted when deleting the cluster bool false no
iam_roles A list of IAM Role ARNs to associate with the cluster list(string) [] no
kms_key_arn The ARN for the KMS encryption key to encrypt the Redshift cluster string null no
logging Logging configuration
object({
bucket_lifecycle_rule = optional(any, [])
bucket_name = optional(string, null)
bucket_prefix = optional(string, "redshift-audit-logs/")
create_bucket = optional(bool, true)
log_destination_type = string
log_exports = optional(list(string), ["connectionlog", "useractivitylog", "userlog"])
})
null no
node_type The node type to be provisioned for the cluster string "dc2.large" no
number_of_nodes The number of compute nodes in the cluster number 1 no
publicly_accessible Whether or not the Redshift cluster will be publicly accessible bool false no
redshift_subnet_group Name of Redshift subnet group the cluster should be attached to string null no
skip_final_snapshot Determines whether a final snapshot is created before deleting the cluster bool false no
subnet_ids List of subnet IDs to deploy Redshift in list(string) null no
tags A mapping of tags to assign to the cluster map(string) {} no
vpc_id ID of the VPC to deploy Redshift in string null no

Outputs

Name Description
cluster_identifier The cluster identifier
cluster_nodes The nodes in the redshift cluster
database The name of the default database in the cluster
elastic_ip The Elastic IP (EIP) address for the cluster
endpoint The connection endpoint
id The Redshift cluster ID
port The port the cluster responds on
security_group_id The ID of the security group associated with the cluster
username Username for the master DB user