Skip to content

Conversation

@inventvenkat
Copy link
Contributor

This pull request introduces a new Terraform composition module for provisioning an AWS Aurora PostgreSQL cluster with optional RDS Proxy support. The module is designed for flexible, environment-specific configuration and includes best practices for security, monitoring, and backup. Key outputs provide connection details and usage examples to simplify integration for applications.

Aurora PostgreSQL Cluster Provisioning

  • Implements a complete Aurora PostgreSQL cluster using the terraform-aws-modules/rds-aurora/aws module, with a primary and one replica instance, parameter groups for optimization, and automated backup, monitoring, and performance insights configuration.
  • Security groups and subnet groups are created and configured to restrict access to the cluster from the application and (optionally) RDS Proxy.
  • Credentials are securely managed via AWS Secrets Manager, with outputs and usage examples for retrieving them. [1] [2]

Environment-Specific Configuration

  • Uses local values (locals.tf) to dynamically select instance classes, backup retention, monitoring, and performance settings based on environment (dev, prod, sandbox, etc.), supporting overrides and tagging conventions.

Optional RDS Proxy Support

  • Conditionally provisions RDS Proxy resources, including security groups, IAM roles/policies, proxy target groups, and connection pool configuration, for improved connection management and failover.
  • Outputs provide proxy endpoints, security group IDs, and IAM role ARNs when enabled, along with application configuration examples.

Comprehensive Outputs and Documentation

  • Exposes all key connection details, resource ARNs/IDs, and configuration flags as outputs, including a rich connection_info output with usage examples for both direct Aurora and proxy connections.

Data Sources for Validation and Reference

  • Adds data sources for region, account, VPC, subnets, security groups, RDS engine versions, and KMS keys to validate inputs and support conditional logic in the module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants