|
| 1 | +# DSQL Cluster |
| 2 | + |
| 3 | +Terraform sub-module which creates DSQL cluster and peering resources. |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | +See [DSQL](https://github.com/terraform-aws-modules/terraform-aws-rds-aurora/tree/master/examples/dsql) directory for working examples to reference: |
| 8 | + |
| 9 | +```hcl |
| 10 | +module "dsql_cluster_1" { |
| 11 | + source = "../../modules/dsql" |
| 12 | +
|
| 13 | + witness_region = "us-west-2" |
| 14 | + create_cluster_peering = true |
| 15 | + clusters = [module.dsql_cluster_2.arn] |
| 16 | +
|
| 17 | + tags = { Name = "dsql-1" } |
| 18 | +} |
| 19 | +
|
| 20 | +module "dsql_cluster_2" { |
| 21 | + source = "../../modules/dsql" |
| 22 | +
|
| 23 | + witness_region = "us-west-2" |
| 24 | + create_cluster_peering = true |
| 25 | + clusters = [module.dsql_cluster_1.arn] |
| 26 | +
|
| 27 | + tags = { Name = "dsql-2" } |
| 28 | +
|
| 29 | + providers = { |
| 30 | + aws = aws.region2 |
| 31 | + } |
| 32 | +} |
| 33 | +``` |
| 34 | + |
| 35 | +<!-- BEGIN_TF_DOCS --> |
| 36 | +## Requirements |
| 37 | + |
| 38 | +| Name | Version | |
| 39 | +|------|---------| |
| 40 | +| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 | |
| 41 | +| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.100 | |
| 42 | + |
| 43 | +## Providers |
| 44 | + |
| 45 | +| Name | Version | |
| 46 | +|------|---------| |
| 47 | +| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.100 | |
| 48 | + |
| 49 | +## Modules |
| 50 | + |
| 51 | +No modules. |
| 52 | + |
| 53 | +## Resources |
| 54 | + |
| 55 | +| Name | Type | |
| 56 | +|------|------| |
| 57 | +| [aws_dsql_cluster.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dsql_cluster) | resource | |
| 58 | +| [aws_dsql_cluster_peering.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dsql_cluster_peering) | resource | |
| 59 | + |
| 60 | +## Inputs |
| 61 | + |
| 62 | +| Name | Description | Type | Default | Required | |
| 63 | +|------|-------------|------|---------|:--------:| |
| 64 | +| <a name="input_clusters"></a> [clusters](#input\_clusters) | List of DSQL Cluster ARNs to be peered to this cluster | `list(string)` | `null` | no | |
| 65 | +| <a name="input_create"></a> [create](#input\_create) | Whether cluster should be created (affects all resources) | `bool` | `true` | no | |
| 66 | +| <a name="input_create_cluster_peering"></a> [create\_cluster\_peering](#input\_create\_cluster\_peering) | Whether to create cluster peering | `bool` | `false` | no | |
| 67 | +| <a name="input_deletion_protection_enabled"></a> [deletion\_protection\_enabled](#input\_deletion\_protection\_enabled) | Whether deletion protection is enabled in this cluster | `bool` | `null` | no | |
| 68 | +| <a name="input_kms_encryption_key"></a> [kms\_encryption\_key](#input\_kms\_encryption\_key) | The ARN of the AWS KMS key that encrypts data in the DSQL Cluster, or `AWS_OWNED_KMS_KEY` | `string` | `null` | no | |
| 69 | +| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to be associated with the AWS DSQL Cluster resource | `map(string)` | `{}` | no | |
| 70 | +| <a name="input_timeouts"></a> [timeouts](#input\_timeouts) | Create timeout configuration for the cluster | `any` | `{}` | no | |
| 71 | +| <a name="input_witness_region"></a> [witness\_region](#input\_witness\_region) | Witness region for the multi-region clusters. Setting this makes this cluster a multi-region cluster. Changing it recreates the cluster | `string` | `null` | no | |
| 72 | + |
| 73 | +## Outputs |
| 74 | + |
| 75 | +| Name | Description | |
| 76 | +|------|-------------| |
| 77 | +| <a name="output_arn"></a> [arn](#output\_arn) | ARN of the cluster | |
| 78 | +| <a name="output_encryption_details"></a> [encryption\_details](#output\_encryption\_details) | Encryption configuration details for the DSQL cluster | |
| 79 | +| <a name="output_identifier"></a> [identifier](#output\_identifier) | Cluster identifier | |
| 80 | +| <a name="output_multi_region_properties"></a> [multi\_region\_properties](#output\_multi\_region\_properties) | Multi-region properties of the DSQL cluster | |
| 81 | +| <a name="output_vpc_endpoint_service_name"></a> [vpc\_endpoint\_service\_name](#output\_vpc\_endpoint\_service\_name) | The DSQL cluster's VPC endpoint service name | |
| 82 | +<!-- END_TF_DOCS --> |
0 commit comments