|
| 1 | +# Terraform AWS ARC Redshift Module Usage Guide |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +### Purpose of the Document |
| 6 | + |
| 7 | +This document provides guidelines and instructions for users looking to create Redshift cluster using the module. |
| 8 | + |
| 9 | +### Module Overview |
| 10 | + |
| 11 | + Terraform module for provisioning and managing Amazon Redshift — supporting both Redshift Serverless and provisioned clusters. This module follows AWS and Terraform best practices, with built-in support for secure password management, VPC integration, IAM roles, and custom configuration parameters. Designed for scalability, security, and automation across development, staging, and production environments |
| 12 | + |
| 13 | +### Prerequisites |
| 14 | + |
| 15 | +Before using this module, ensure you have the following: |
| 16 | + |
| 17 | +- AWS credentials configured. |
| 18 | +- Terraform installed. |
| 19 | +- A working knowledge of AWS VPC, All Redshift services and Terraform concepts. |
| 20 | + |
| 21 | +## Getting Started |
| 22 | + |
| 23 | +### Module Source |
| 24 | + |
| 25 | +To use the module in your Terraform configuration, include the following source block: |
| 26 | + |
| 27 | +```hcl |
| 28 | +module "arc-redshift" { |
| 29 | + source = "sourcefuse/arc-redshift/aws" |
| 30 | + version = "0.0.1" |
| 31 | + namespace = var.namespace |
| 32 | + environment = var.environment |
| 33 | + name = var.name |
| 34 | +
|
| 35 | + # Network configuration - using the subnets we created |
| 36 | + vpc_id = data.aws_vpc.vpc.id |
| 37 | + subnet_ids = data.aws_subnets.private.ids |
| 38 | +
|
| 39 | + # Cluster configuration |
| 40 | + database_name = var.database_name |
| 41 | + master_username = var.master_username |
| 42 | + manage_user_password = var.manage_user_password |
| 43 | + security_group_data = var.security_group_data |
| 44 | + security_group_name = var.security_group_name |
| 45 | + node_type = var.node_type |
| 46 | + number_of_nodes = var.node_count |
| 47 | + cluster_type = var.node_count > 1 ? "multi-node" : "single-node" |
| 48 | +
|
| 49 | + # Other configuration |
| 50 | + skip_final_snapshot = true |
| 51 | + publicly_accessible = false |
| 52 | + encrypted = true |
| 53 | +
|
| 54 | + tags = module.tags.tags |
| 55 | +} |
| 56 | +``` |
| 57 | + |
| 58 | +Refer to the [Terraform Registry](https://registry.terraform.io/modules/sourcefuse/arc-redshift/aws/latest) for the latest version. |
| 59 | + |
| 60 | +### Integration with Existing Terraform Configurations |
| 61 | + |
| 62 | +Refer to the Terraform Registry for the latest version. |
| 63 | + |
| 64 | +## Integration with Existing Terraform Configurations |
| 65 | +Integrate the module with your existing Terraform mono repo configuration, follow the steps below: |
| 66 | + |
| 67 | +- Create a new folder in terraform/redshift named . |
| 68 | +- Create the required files, see the examples to base off of. |
| 69 | +- Configure with your backend: |
| 70 | + - Create the environment backend configuration file: config.<environment>.hcl |
| 71 | + - region: Where the backend resides |
| 72 | + - key: <working_directory>/terraform.tfstate |
| 73 | + - bucket: Bucket name where the terraform state will reside |
| 74 | + - dynamodb_table: Lock table so there are not duplicate tfplans in the mix |
| 75 | + - encrypt: Encrypt all traffic to and from the backend |
| 76 | + |
| 77 | +### Required AWS Permissions |
| 78 | + |
| 79 | +Ensure that the AWS credentials used to execute Terraform have the necessary permissions to create, list and modify: |
| 80 | + |
| 81 | +- All redshift services |
| 82 | +- VPC and networking configuration |
| 83 | + |
| 84 | +## Module Configuration |
| 85 | + |
| 86 | +### Input Variables |
| 87 | + |
| 88 | +For a list of input variables, see the README [Inputs](https://github.com/sourcefuse/terraform-aws-arc-redshift#inputs) section. |
| 89 | + |
| 90 | +### Output Values |
| 91 | + |
| 92 | +For a list of outputs, see the README [Outputs](https://github.com/sourcefuse/terraform-aws-arc-redshift?tab=readme-ov-file#outputs) section. |
| 93 | + |
| 94 | +## Module Usage |
| 95 | + |
| 96 | +### Basic Usage |
| 97 | + |
| 98 | +For basic usage, see the [examples](https://github.com/sourcefuse/terraform-aws-arc-redshift/tree/main/examples) folder. |
| 99 | + |
| 100 | +This example will create: |
| 101 | + |
| 102 | +- **Redshift Studio Domain**: Complete |
| 103 | + |
| 104 | +### Tips and Recommendations |
| 105 | + |
| 106 | +- The module focuses on provisioning redshift. The convention-based approach enables downstream services to easily attach to the redshift. Adjust the configuration parameters as needed for your specific use case. |
| 107 | + |
| 108 | +## Troubleshooting |
| 109 | + |
| 110 | +### Reporting Issues |
| 111 | + |
| 112 | +If you encounter a bug or issue, please report it on the [GitHub repository](https://github.com/sourcefuse/terraform-aws-arc-redshift/issues). |
| 113 | + |
| 114 | +## Security Considerations |
| 115 | + |
| 116 | +### AWS VPC |
| 117 | + |
| 118 | +Understand the security considerations related to Redshift on AWS when using this module. |
| 119 | + |
| 120 | +### Best Practices for AWS Redshift |
| 121 | + |
| 122 | +Follow best practices to ensure secure Redshift configurations: |
| 123 | + |
| 124 | +- [AWS Redshift Security Best Practices](https://docs.aws.amazon.com/redshift/latest/dg/best-practices.html) |
| 125 | + |
| 126 | +## Contributing and Community Support |
| 127 | + |
| 128 | +### Contributing Guidelines |
| 129 | + |
| 130 | +Contribute to the module by following the guidelines outlined in the [CONTRIBUTING.md](https://github.com/sourcefuse/terraform-aws-arc-redshift/blob/main/CONTRIBUTING.md) file. |
| 131 | + |
| 132 | +### Reporting Bugs and Issues |
| 133 | + |
| 134 | +If you find a bug or issue, report it on the [GitHub repository](https://github.com/sourcefuse/terraform-aws-arc-redshift/issues). |
| 135 | + |
| 136 | +## License |
| 137 | + |
| 138 | +### License Information |
| 139 | + |
| 140 | +This module is licensed under the Apache 2.0 license. Refer to the [LICENSE](https://github.com/sourcefuse/terraform-aws-arc-redshift/blob/main/LICENSE) file for more details. |
| 141 | + |
| 142 | +### Open Source Contribution |
| 143 | + |
| 144 | +Contribute to open source by using and enhancing this module. Your contributions are welcome! |
0 commit comments