README.md

May 21, 2026 Β· View on GitHub

Project Banner

Latest ReleaseSlack CommunityGet Support

This component is responsible for provisioning Aurora Postgres RDS clusters. It seeds relevant database information (hostnames, username, password, etc.) into AWS SSM Parameter Store.

Tip

πŸ‘½ Use Atmos with Terraform

Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform.
Works with Github Actions, Atlantis, or Spacelift.

Watch demo of using Atmos with Terraform
Example of running atmos to manage infrastructure from our Quick Start tutorial.

Usage

Stack Level: Regional

Here's an example for how to use this component.

stacks/catalog/aurora-postgres/defaults.yaml file (base component for all Aurora Postgres clusters with default settings):

components:
  terraform:
    aurora-postgres/defaults:
      metadata:
        type: abstract
      vars:
        enabled: true
        name: aurora-postgres
        tags:
          Team: sre
          Service: aurora-postgres
        cluster_name: shared
        deletion_protection: false
        storage_encrypted: true
        engine: aurora-postgresql

        # Provisioned configuration
        engine_mode: provisioned
        engine_version: "15.3"
        cluster_family: aurora-postgresql15
        # 1 writer, 1 reader
        cluster_size: 2
        # https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html
        instance_type: db.t3.medium

        admin_user: postgres
        admin_password: "" # generate random password
        database_name: postgres
        database_port: 5432
        skip_final_snapshot: false
        # Enhanced Monitoring
        # A boolean flag to enable/disable the creation of the enhanced monitoring IAM role.
        # If set to false, the module will not create a new role and will use rds_monitoring_role_arn for enhanced monitoring
        enhanced_monitoring_role_enabled: true
        # The interval, in seconds, between points when enhanced monitoring metrics are collected for the DB instance.
        # To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60
        rds_monitoring_interval: 15
        # Allow ingress from the following accounts
        # If any of tenant, stage, or environment aren't given, this will be taken
        allow_ingress_from_vpc_accounts:
          - tenant: core
            stage: auto

Example (not actual):

stacks/uw2-dev.yaml file (override the default settings for the cluster in the dev account, create an additional database and user):

import:
  - catalog/aurora-postgres/defaults

components:
  terraform:
    aurora-postgres:
      metadata:
        component: aurora-postgres
        inherits:
          - aurora-postgres/defaults
      vars:
        enabled: true

Finding Aurora Engine Version

Use the following to query the AWS API by engine-mode. Both provisioned and Serverless v2 use the privisoned engine mode, whereas only Serverless v1 uses the serverless engine mode.

aws rds describe-db-engine-versions \
  --engine aurora-postgresql \
  --query 'DBEngineVersions[].EngineVersion' \
  --filters 'Name=engine-mode,Values=serverless'

Use the following to query AWS API by db-instance-class. Use this query to find supported versions for a specific instance class, such as db.serverless with Serverless v2.

aws rds describe-orderable-db-instance-options \
  --engine aurora-postgresql \
  --db-instance-class db.serverless \
  --query 'OrderableDBInstanceOptions[].[EngineVersion]'

Once a version has been selected, use the following to find the cluster family.

aws rds describe-db-engine-versions --engine aurora-postgresql --query "DBEngineVersions[]" | \
jq '.[] | select(.EngineVersion == "15.3") |
  { Engine: .Engine, EngineVersion: .EngineVersion, DBParameterGroupFamily: .DBParameterGroupFamily }'

Examples

Generally there are three different engine configurations for Aurora: provisioned, Serverless v1, and Serverless v2.

Provisioned Aurora Postgres

See the default usage example above

Serverless v1 Aurora Postgres

Serverless v1 requires engine-mode set to serverless uses scaling_configuration to configure scaling options.

For valid values, see ModifyCurrentDBClusterCapacity.

components:
  terraform:
    aurora-postgres:
      vars:
        enabled: true
        name: aurora-postgres
        eks_component_names:
          - eks/cluster
        allow_ingress_from_vpc_accounts:
          # Allows Spacelift
          - tenant: core
            stage: auto
            environment: use2
          # Allows VPN
          - tenant: core
            stage: network
            environment: use2
        cluster_name: shared
        engine: aurora-postgresql

        # Serverless v1 configuration
        engine_mode: serverless
        instance_type: "" # serverless engine_mode ignores `var.instance_type`
        engine_version: "13.9" # Latest supported version as of 08/28/2023
        cluster_family: aurora-postgresql13
        cluster_size: 0 # serverless
        scaling_configuration:
          - auto_pause: true
            max_capacity: 4
            min_capacity: 2
            seconds_until_auto_pause: 300
            timeout_action: null

        admin_user: postgres
        admin_password: "" # generate random password
        database_name: postgres
        database_port: 5432
        storage_encrypted: true
        deletion_protection: true
        skip_final_snapshot: false
        # Creating read-only users or additional databases requires Spacelift
        read_only_users_enabled: false
        # Enhanced Monitoring
        # A boolean flag to enable/disable the creation of the enhanced monitoring IAM role.
        # If set to false, the module will not create a new role and will use rds_monitoring_role_arn for enhanced monitoring
        enhanced_monitoring_role_enabled: true
        enhanced_monitoring_attributes: ["monitoring"]
        # The interval, in seconds, between points when enhanced monitoring metrics are collected for the DB instance.
        # To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60
        rds_monitoring_interval: 15
        iam_database_authentication_enabled: false
        additional_users: {}

Serverless v2 Aurora Postgres

Aurora Postgres Serverless v2 uses the provisioned engine mode with db.serverless instances. In order to configure scaling with Serverless v2, use var.serverlessv2_scaling_configuration.

For more on valid scaling configurations, see Performance and scaling for Aurora Serverless v2.

components:
  terraform:
    aurora-postgres:
      vars:
        enabled: true
        name: aurora-postgres
        eks_component_names:
          - eks/cluster
        allow_ingress_from_vpc_accounts:
          # Allows Spacelift
          - tenant: core
            stage: auto
            environment: use2
          # Allows VPN
          - tenant: core
            stage: network
            environment: use2
        cluster_name: shared
        engine: aurora-postgresql

        # Serverless v2 configuration
        engine_mode: provisioned
        instance_type: "db.serverless"
        engine_version: "15.3"
        cluster_family: aurora-postgresql15
        cluster_size: 2
        serverlessv2_scaling_configuration:
          min_capacity: 2
          max_capacity: 64

        admin_user: postgres
        admin_password: "" # generate random password
        database_name: postgres
        database_port: 5432
        storage_encrypted: true
        deletion_protection: true
        skip_final_snapshot: false
        # Creating read-only users or additional databases requires Spacelift
        read_only_users_enabled: false
        # Enhanced Monitoring
        # A boolean flag to enable/disable the creation of the enhanced monitoring IAM role.
        # If set to false, the module will not create a new role and will use rds_monitoring_role_arn for enhanced monitoring
        enhanced_monitoring_role_enabled: true
        enhanced_monitoring_attributes: ["monitoring"]
        # The interval, in seconds, between points when enhanced monitoring metrics are collected for the DB instance.
        # To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60
        rds_monitoring_interval: 15
        iam_database_authentication_enabled: false
        additional_users: {}

Important

In Cloud Posse's examples, we avoid pinning modules to specific versions to prevent discrepancies between the documentation and the latest released versions. However, for your own projects, we strongly advise pinning each module to the exact version you're using. This practice ensures the stability of your infrastructure. Additionally, we recommend implementing a systematic approach for updating versions to avoid unexpected changes.

Requirements

NameVersion
terraform>= 1.3.0
aws>= 4.9.0, < 6.0.0
postgresql>= 1.17.1
random>= 2.3

Providers

NameVersion
aws>= 4.9.0, < 6.0.0
random>= 2.3

Modules

NameSourceVersion
aurora_postgres_clustercloudposse/rds-cluster/aws2.6.0
clustercloudposse/label/null0.25.0
dns_gbl_delegatedcloudposse/stack-config/yaml//modules/remote-state2.0.0
ekscloudposse/stack-config/yaml//modules/remote-state2.0.0
iam_roles../account-map/modules/iam-rolesn/a
kms_key_rdscloudposse/kms-key/aws0.12.2
parameter_store_writecloudposse/ssm-parameter-store/aws0.13.0
rds_proxycloudposse/rds-db-proxy/aws1.1.1
thiscloudposse/label/null0.25.0
vpccloudposse/stack-config/yaml//modules/remote-state2.0.0
vpc_ingresscloudposse/stack-config/yaml//modules/remote-state2.0.0

Resources

NameType
aws_route53_record.proxyresource
aws_security_group.proxyresource
aws_security_group_rule.cluster_ingress_from_proxyresource
aws_security_group_rule.proxy_egress_to_clusterresource
random_password.admin_passwordresource
random_pet.admin_userresource
random_pet.database_nameresource
aws_caller_identity.currentdata source
aws_iam_policy_document.kms_key_rdsdata source
aws_partition.currentdata source
aws_security_groups.alloweddata source

Inputs

NameDescriptionTypeDefaultRequired
additional_tag_mapAdditional key-value pairs to add to each map in tags_as_list_of_maps. Not added to tags or id.
This is for some rare cases where resources want additional configuration of tags
and therefore take a list of maps with tag key, value, and additional configuration.
map(string){}no
admin_passwordPostgres password for the admin userstring""no
admin_userPostgres admin user namestring""no
allow_ingress_from_vpc_accountsList of account contexts to pull VPC ingress CIDR and add to cluster security group.
e.g.
{
environment = "ue2",
stage = "auto",
tenant = "core"
}

Defaults to the "vpc" component in the given account
list(object({
vpc = optional(string, "vpc")
environment = optional(string)
stage = optional(string)
tenant = optional(string)
}))
[]no
allow_major_version_upgradeEnable to allow major engine version upgrades when changing engine versions. Defaults to false.boolfalseno
allowed_cidr_blocksList of CIDRs allowed to access the database (in addition to security groups and subnets)list(string)[]no
allowed_security_group_idsList of security group ids that should be allowed access to the databaselist(string)[]no
allowed_security_group_namesList of security group names (tags) that should be allowed access to the databaselist(string)[]no
attributesID element. Additional attributes (e.g. workers or cluster) to add to id,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by the delimiter
and treated as a single ID element.
list(string)[]no
autoscaling_enabledWhether to enable cluster autoscalingboolfalseno
autoscaling_max_capacityMaximum number of instances to be maintained by the autoscalernumber5no
autoscaling_min_capacityMinimum number of instances to be maintained by the autoscalernumber1no
autoscaling_policy_typeAutoscaling policy type. TargetTrackingScaling and StepScaling are supportedstring"TargetTrackingScaling"no
autoscaling_scale_in_cooldownThe amount of time, in seconds, after a scaling activity completes and before the next scaling down activity can start. Default is 300snumber300no
autoscaling_scale_out_cooldownThe amount of time, in seconds, after a scaling activity completes and before the next scaling up activity can start. Default is 300snumber300no
autoscaling_target_metricsThe metrics type to use. If this value isn't provided the default is CPU utilizationstring"RDSReaderAverageCPUUtilization"no
autoscaling_target_valueThe target value to scale with respect to target metricsnumber75no
backup_windowDaily time range during which the backups happen, UTCstring"07:00-09:00"no
ca_cert_identifierThe identifier of the CA certificate for the DB instancestringnullno
cluster_dns_name_partPart of DNS name added to module and cluster name for DNS for cluster endpointstring"writer"no
cluster_familyFamily of the DB parameter group. Valid values for Aurora PostgreSQL: aurora-postgresql9.6, aurora-postgresql10, aurora-postgresql11, aurora-postgresql12string"aurora-postgresql13"no
cluster_nameShort name for this clusterstringn/ayes
cluster_parametersList of DB cluster parameters to apply
list(object({
apply_method = string
name = string
value = string
}))
[]no
cluster_sizePostgres cluster sizenumbern/ayes
contextSingle object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as null to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional_tag_map, which are merged.
any
{
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
}
no
database_insights_modeThe database insights mode for the RDS cluster. Valid values are standard, advanced. See https://registry.terraform.io/providers/hashicorp/aws/6.16.0/docs/resources/rds_cluster#database_insights_mode-1stringnullno
database_nameName for an automatically created database on cluster creation. An empty name will generate a db name.string""no
database_portDatabase portnumber5432no
deletion_protectionSpecifies whether the Cluster should have deletion protection enabled. The database can't be deleted when this value is set to trueboolfalseno
delimiterDelimiter to be used between ID elements.
Defaults to - (hyphen). Set to "" to use no delimiter at all.
stringnullno
descriptor_formatsDescribe additional descriptors to be output in the descriptors output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
{<br/> format = string<br/> labels = list(string)<br/>}
(Type is any so the map values can later be enhanced to provide additional options.)
format is a Terraform format string to be passed to the format() function.
labels is a list of labels, in order, to pass to format() function.
Label values will be normalized before being passed to format() so they will be
identical to how they appear in id.
Default is {} (descriptors output will be empty).
any{}no
dns_gbl_delegated_environment_nameThe name of the environment where global dns_delegated is provisionedstring"gbl"no
egress_enabledIf true, the created security group will allow egress on all ports and protocols to all IP addresses.
If false, no egress rules will be created by this module; egress must be configured via other means
(e.g. additional security group rules) or all outbound traffic will be denied.
booltrueno
eks_component_namesThe names of the eks componentsset(string)
[
"eks/cluster"
]
no
eks_security_group_enabledUse the eks default security groupboolfalseno
enabledSet to false to prevent the module from creating any resourcesboolnullno
enabled_cloudwatch_logs_exportsList of log types to export to cloudwatch. The following log types are supported: audit, error, general, slowquerylist(string)[]no
engineName of the database engine to be used for the DB clusterstring"postgresql"no
engine_modeThe database engine mode. Valid values: global, multimaster, parallelquery, provisioned, serverlessstringn/ayes
engine_versionEngine version of the Aurora global databasestring"13.4"no
enhanced_monitoring_attributesAttributes used to format the Enhanced Monitoring IAM role. If this role hits IAM role length restrictions (max 64 characters), consider shortening these strings.list(string)
[
"enhanced-monitoring"
]
no
enhanced_monitoring_role_enabledA boolean flag to enable/disable the creation of the enhanced monitoring IAM role. If set to false, the module will not create a new role and will use rds_monitoring_role_arn for enhanced monitoringbooltrueno
environmentID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT'stringnullno
iam_database_authentication_enabledSpecifies whether or mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabledboolfalseno
id_length_limitLimit id to this many characters (minimum 6).
Set to 0 for unlimited length.
Set to null for keep the existing setting, which defaults to 0.
Does not affect id_full.
numbernullno
instance_typeEC2 instance type for Postgres clusterstringn/ayes
intra_security_group_traffic_enabledWhether to allow traffic between resources inside the database's security group.boolfalseno
label_key_caseControls the letter case of the tags keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the tags input.
Possible values: lower, title, upper.
Default value: title.
stringnullno
label_orderThe order in which the labels (ID elements) appear in the id.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present.
list(string)nullno
label_value_caseControls the letter case of ID elements (labels) as included in id,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the tags input.
Possible values: lower, title, upper and none (no transformation).
Set this to title and set delimiter to "" to yield Pascal Case IDs.
Default value: lower.
stringnullno
labels_as_tagsSet of labels (ID elements) to include as tags in the tags output.
Default is to include all labels.
Tags with empty values will not be included in the tags output.
Set to [] to suppress all generated tags.
Notes:
The value of the name tag, if included, will be the id, not the name.
Unlike other null-label inputs, the initial setting of labels_as_tags cannot be
changed in later chained modules. Attempts to change it will be silently ignored.
set(string)
[
"default"
]
no
maintenance_windowWeekly time range during which system maintenance can occur, in UTCstring"wed:03:00-wed:04:00"no
manage_admin_user_passwordSet to true to allow RDS to manage the master user password in Secrets Manager. Cannot be set if admin_password is providedboolfalseno
nameID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a tag.
The "name" tag is set to the full id string. There is no tag with the value of the name input.
stringnullno
namespaceID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally uniquestringnullno
performance_insights_enabledWhether to enable Performance Insightsboolfalseno
promotion_tierFailover Priority setting on instance level. The reader who has lower tier has higher priority to get promoted to writer.

Readers in promotion tiers 0 and 1 scale at the same time as the writer. Readers in promotion tiers 2–15 scale independently from the writer. For more information, see: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.how-it-works.html#aurora-serverless-v2.how-it-works.scaling
number0no
proxy_authConfiguration blocks with authorization mechanisms to connect to the associated database instances or clusters.
Each block supports:
- auth_scheme: The type of authentication that the proxy uses for connections. Valid values: SECRETS
- client_password_auth_type: The type of authentication the proxy uses for connections from clients. Valid values: MYSQL_NATIVE_PASSWORD, POSTGRES_SCRAM_SHA_256, POSTGRES_MD5, SQL_SERVER_AUTHENTICATION
- description: A user-specified description about the authentication used by a proxy
- iam_auth: Whether to require or disallow AWS IAM authentication. Valid values: DISABLED, REQUIRED, OPTIONAL
- secret_arn: The ARN of the Secrets Manager secret containing the database credentials
- username: The name of the database user to which the proxy connects
list(object({
auth_scheme = optional(string, "SECRETS")
client_password_auth_type = optional(string)
description = optional(string)
iam_auth = optional(string, "DISABLED")
secret_arn = optional(string)
username = optional(string)
}))
nullno
proxy_client_password_auth_typeThe type of authentication the proxy uses for connections from clients. Valid values: MYSQL_NATIVE_PASSWORD, POSTGRES_SCRAM_SHA_256, POSTGRES_MD5, SQL_SERVER_AUTHENTICATIONstringnullno
proxy_connection_borrow_timeoutThe number of seconds for a proxy to wait for a connection to become available in the connection poolnumber120no
proxy_debug_loggingWhether the proxy includes detailed information about SQL statements in its logsboolfalseno
proxy_dns_enabledWhether to create a Route53 DNS record for the proxy endpointbooltrueno
proxy_dns_name_partPart of DNS name added to module and cluster name for DNS for the proxy endpointstring"proxy"no
proxy_enabledWhether to enable RDS Proxy for the Aurora clusterboolfalseno
proxy_existing_iam_role_arnThe ARN of an existing IAM role that the proxy can use to access secrets in AWS Secrets Manager. If not provided, the module will create a role to access secrets in Secrets Managerstringnullno
proxy_iam_authWhether to require or disallow AWS IAM authentication for connections to the proxy. Valid values: DISABLED, REQUIRED, OPTIONALstring"DISABLED"no
proxy_iam_role_attributesAdditional attributes to add to the ID of the IAM role that the proxy uses to access secrets in AWS Secrets Managerlist(string)nullno
proxy_idle_client_timeoutThe number of seconds that a connection to the proxy can be inactive before the proxy disconnects itnumber1800no
proxy_init_queryOne or more SQL statements for the proxy to run when opening each new database connectionstringnullno
proxy_max_connections_percentThe maximum size of the connection pool for each target in a target group. Must be between 1 and 100.number100no
proxy_max_idle_connections_percentControls how actively the proxy closes idle database connections in the connection pool. Must be between 0 and 100.number50no
proxy_require_tlsA Boolean parameter that specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxybooltrueno
proxy_secret_arnThe ARN of the secret in AWS Secrets Manager that contains the database credentials. Required if manage_admin_user_password is false and proxy_auth is not providedstringnullno
proxy_session_pinning_filtersEach item in the list represents a class of SQL operations that normally cause all later statements in a session using a proxy to be pinned to the same underlying database connectionlist(string)nullno
publicly_accessibleSet true to make this database accessible from the public internetboolfalseno
rds_monitoring_intervalThe interval, in seconds, between points when enhanced monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60number60no
reader_dns_name_partPart of DNS name added to module and cluster name for DNS for cluster readerstring"reader"no
regex_replace_charsTerraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, "/[^a-zA-Z0-9-]/" is used to remove all characters other than hyphens, letters and digits.
stringnullno
regionAWS Regionstringn/ayes
restore_to_point_in_timeList of point-in-time recovery options. Valid parameters are:

source_cluster_identifier
Identifier of the source database cluster from which to restore.
restore_type:
Type of restore to be performed. Valid options are "full-copy" and "copy-on-write".
use_latest_restorable_time:
Set to true to restore the database cluster to the latest restorable backup time. Conflicts with restore_to_time.
restore_to_time:
Date and time in UTC format to restore the database cluster to. Conflicts with use_latest_restorable_time.
list(object({
source_cluster_identifier = string
restore_type = optional(string, "copy-on-write")
use_latest_restorable_time = optional(bool, true)
restore_to_time = optional(string, null)
}))
[]no
retention_periodNumber of days to retain backups fornumber5no
scaling_configurationList of nested attributes with scaling properties. Only valid when engine_mode is set to serverless. This is required for Serverless v1
list(object({
auto_pause = bool
max_capacity = number
min_capacity = number
seconds_until_auto_pause = number
timeout_action = string
}))
[]no
serverlessv2_scaling_configurationNested attribute with scaling properties for ServerlessV2. Only valid when engine_mode is set to provisioned. This is required for Serverless v2
object({
min_capacity = number
max_capacity = number
})
nullno
skip_final_snapshotNormally AWS makes a snapshot of the database before deleting it. Set this to true in order to skip this.
NOTE: The final snapshot has a name derived from the cluster name. If you delete a cluster, get a final snapshot,
then create a cluster of the same name, its final snapshot will fail with a name collision unless you delete
the previous final snapshot first.
boolfalseno
snapshot_identifierSpecifies whether or not to create this cluster from a snapshotstringnullno
ssm_cluster_name_overrideSet a cluster name into the ssm path prefixstring""no
ssm_path_prefixTop level SSM path prefix (without leading or trailing slash)string"aurora-postgres"no
stageID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release'stringnullno
storage_encryptedSpecifies whether the DB cluster is encryptedbooltrueno
storage_typeOne of 'standard' (magnetic), 'gp2' (general purpose SSD), 'io1' (provisioned IOPS SSD), 'aurora', or 'aurora-iopt1'stringnullno
tagsAdditional tags (e.g. {'BusinessUnit': 'XYZ'}).
Neither the tag keys nor the tag values will be modified by this module.
map(string){}no
tenantID element _(Rarely used, not included by default)_. A customer identifier, indicating who this instance of a resource is forstringnullno
vpc_component_nameThe name of the VPC componentstring"vpc"no

Outputs

NameDescription
admin_usernamePostgres admin username
allowed_security_groupsThe resulting list of security group IDs that are allowed to connect to the Aurora Postgres cluster.
cluster_endpointPostgres cluster endpoint
cluster_identifierPostgres cluster identifier
config_mapMap containing information pertinent to a PostgreSQL client configuration.
database_namePostgres database name
instance_endpointsList of Postgres instance endpoints
kms_key_arnKMS key ARN for Aurora Postgres
master_hostnamePostgres master hostname
proxy_arnThe ARN of the RDS Proxy
proxy_default_target_group_arnThe Amazon Resource Name (ARN) representing the default target group
proxy_default_target_group_nameThe name of the default target group
proxy_dns_nameThe DNS name of the RDS Proxy (Route53 record)
proxy_endpointThe endpoint of the RDS Proxy
proxy_iam_role_arnThe ARN of the IAM role that the proxy uses to access secrets in AWS Secrets Manager
proxy_idThe ID of the RDS Proxy
proxy_security_group_idThe security group ID of the RDS Proxy
proxy_target_endpointHostname for the target RDS DB Instance
proxy_target_idIdentifier of db_proxy_name, target_group_name, target type, and resource identifier separated by forward slashes
proxy_target_portPort for the target Aurora DB cluster
proxy_target_rds_resource_idIdentifier representing the DB cluster target
proxy_target_typeType of target (e.g. RDS_INSTANCE or TRACKED_CLUSTER)
reader_endpointPostgres reader endpoint
replicas_hostnamePostgres replicas hostname
security_group_idThe security group ID of the Aurora Postgres cluster
ssm_key_pathsNames (key paths) of all SSM parameters stored for this cluster

Check out these related projects.

  • Cloud Posse Terraform Modules - Our collection of reusable Terraform modules used by our reference architectures.
  • Atmos - Atmos is like docker-compose but for your infrastructure

References

For additional context, refer to some of these links.

Tip

Use Terraform Reference Architectures for AWS

Use Cloud Posse's ready-to-go terraform architecture blueprints for AWS to get up and running quickly.

βœ… We build it together with your team.
βœ… Your team owns everything.
βœ… 100% Open Source and backed by fanatical support.

Request Quote

πŸ“š Learn More

Cloud Posse is the leading DevOps Accelerator for funded startups and enterprises.

Your team can operate like a pro today.

Ensure that your team succeeds by using Cloud Posse's proven process and turnkey blueprints. Plus, we stick around until you succeed.

Day-0: Your Foundation for Success

  • Reference Architecture. You'll get everything you need from the ground up built using 100% infrastructure as code.
  • Deployment Strategy. Adopt a proven deployment strategy with GitHub Actions, enabling automated, repeatable, and reliable software releases.
  • Site Reliability Engineering. Gain total visibility into your applications and services with Datadog, ensuring high availability and performance.
  • Security Baseline. Establish a secure environment from the start, with built-in governance, accountability, and comprehensive audit logs, safeguarding your operations.
  • GitOps. Empower your team to manage infrastructure changes confidently and efficiently through Pull Requests, leveraging the full power of GitHub Actions.

Request Quote

Day-2: Your Operational Mastery

  • Training. Equip your team with the knowledge and skills to confidently manage the infrastructure, ensuring long-term success and self-sufficiency.
  • Support. Benefit from a seamless communication over Slack with our experts, ensuring you have the support you need, whenever you need it.
  • Troubleshooting. Access expert assistance to quickly resolve any operational challenges, minimizing downtime and maintaining business continuity.
  • Code Reviews. Enhance your team’s code quality with our expert feedback, fostering continuous improvement and collaboration.
  • Bug Fixes. Rely on our team to troubleshoot and resolve any issues, ensuring your systems run smoothly.
  • Migration Assistance. Accelerate your migration process with our dedicated support, minimizing disruption and speeding up time-to-value.
  • Customer Workshops. Engage with our team in weekly workshops, gaining insights and strategies to continuously improve and innovate.

Request Quote

✨ Contributing

This project is under active development, and we encourage contributions from our community.

Many thanks to our outstanding contributors:

For πŸ› bug reports & feature requests, please use the issue tracker.

In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.

  1. Review our Code of Conduct and Contributor Guidelines.
  2. Fork the repo on GitHub
  3. Clone the project to your own machine
  4. Commit changes to your own branch
  5. Push your work back up to your fork
  6. Submit a Pull Request so that we can review your changes

NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!

Running Terraform Tests

We use Atmos to streamline how Terraform tests are run. It centralizes configuration and wraps common test workflows with easy-to-use commands.

All tests are located in the test/ folder.

Under the hood, tests are powered by Terratest together with our internal Test Helpers library, providing robust infrastructure validation.

Setup dependencies:

To run tests:

  • Run all tests:
    atmos test run
    
  • Clean up test artifacts:
    atmos test clean
    
  • Explore additional test options:
    atmos test --help
    

The configuration for test commands is centrally managed. To review what's being imported, see the atmos.yaml file.

Learn more about our automated testing in our documentation or implementing custom commands with atmos.

🌎 Slack Community

Join our Open Source Community on Slack. It's FREE for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally sweet infrastructure.

πŸ“° Newsletter

Sign up for our newsletter and join 3,000+ DevOps engineers, CTOs, and founders who get insider access to the latest DevOps trends, so you can always stay in the know. Dropped straight into your Inbox every week β€” and usually a 5-minute read.

πŸ“† Office Hours

Join us every Wednesday via Zoom for your weekly dose of insider DevOps trends, AWS news and Terraform insights, all sourced from our SweetOps community, plus a live Q&A that you can’t find anywhere else. It's FREE for everyone!

License

License

Preamble to the Apache License, Version 2.0

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.

Trademarks

All other trademarks referenced herein are the property of their respective owners.


Copyright Β© 2017-2026 Cloud Posse, LLC

README footer

Beacon