This is a separate submodule —
modules/dsql — distinct from the main Aurora module. It provisions Amazon Aurora DSQL clusters and does not share inputs or outputs with the root terraform-aws-rds-aurora module.Overview
The DSQL submodule creates and manages:aws_dsql_cluster— an Aurora DSQL cluster with optional KMS encryption, deletion protection, and multi-region configuration.aws_dsql_cluster_peering(optional) — peering between two DSQL clusters in different regions, enabling a multi-region active-active topology.
witness_region to convert a single-region cluster into a multi-region cluster. Set create_cluster_peering = true and supply the peer cluster ARNs in clusters to complete the peering relationship.
Module source
Resources created
| Resource | Condition |
|---|---|
aws_dsql_cluster | Always (when create = true) |
aws_dsql_cluster_peering | When create = true and create_cluster_peering = true |
Usage examples
Inputs
General
Whether cluster should be created (affects all resources).
Region where the resource(s) will be managed. Defaults to the Region set in the provider configuration. Use this to manage a cluster in a region different from the default provider region.
Name used across resources created. Applied as the
Name tag on the cluster when non-empty.A map of tags to add to all resources.
Cluster
Whether deletion protection is enabled in this cluster. When
true, the cluster cannot be deleted without first disabling this setting.The ARN of the AWS KMS key that encrypts data in the DSQL cluster, or the literal string
AWS_OWNED_KMS_KEY to use an AWS-owned key.Destroys the cluster even if
deletion_protection_enabled is set to true. Defaults to false.Cluster Peering
Whether to create an
aws_dsql_cluster_peering resource. Requires clusters and witness_region to also be set.List of DSQL Cluster ARNs to be peered with this cluster.
Witness region for the multi-region clusters. Setting this makes this cluster a multi-region cluster. Changing this value recreates the cluster.
Timeout configuration for the cluster peering creation.
Outputs
ARN of the DSQL cluster.
The unique identifier assigned to the DSQL cluster.
Encryption configuration details for the DSQL cluster, including the KMS key used and encryption status.
Multi-region properties of the DSQL cluster, including the witness region and linked cluster information.
The DSQL cluster’s VPC endpoint service name. Use this to create a VPC endpoint in the same VPC as your application.

