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.3.0
aws ~> 6.0

Providers

Name Version
aws ~> 6.0

Modules

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

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_vpc_security_group_egress_rule.default resource
aws_vpc_security_group_ingress_rule.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
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
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
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 for Redshift cluster.

bucket_lifecycle_rule: List of lifecycle configuration settings for the logging S3 bucket.
See https://github.com/schubergphilis/terraform-aws-mcaf-s3 for complete structure.
Passed directly to the S3 module's lifecycle_rule variable.
object({
create_bucket = optional(bool, true)
bucket_lifecycle_rule = optional(any, [])
bucket_name = optional(string)
bucket_prefix = optional(string, "redshift-audit-logs/")
log_destination_type = string
log_exports = optional(list(string), ["connectionlog", "useractivitylog", "userlog"])
})
null no
maintenance_track_name The name of the maintenance track to apply to the cluster. string "current" 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
region The AWS region where resources will be created; if omitted the default provider region is used string null no
security_group_egress_rules Security Group egress rules
list(object({
cidr_ipv4 = optional(string)
cidr_ipv6 = optional(string)
description = string
from_port = optional(number)
ip_protocol = optional(string, "-1")
prefix_list_id = optional(string)
referenced_security_group_id = optional(string)
to_port = optional(number)
}))
[] no
security_group_ids The security group(s) for running the Redshift cluster within the VPC. If not specified a default SG will be created list(string) [] no
security_group_ingress_rules Security Group ingress rules
list(object({
cidr_ipv4 = optional(string)
cidr_ipv6 = optional(string)
description = string
from_port = optional(number)
ip_protocol = optional(string, "-1")
prefix_list_id = optional(string)
referenced_security_group_id = optional(string)
to_port = optional(number)
}))
[] 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

About

Terraform module to setup and manage an AWS Redshift cluster.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 13

Languages