diff --git a/README.md b/README.md
index ee0b31f5..b02ecf9e 100644
--- a/README.md
+++ b/README.md
@@ -428,6 +428,7 @@ Available targets:
| [cluster\_type](#input\_cluster\_type) | Either `regional` or `global`.
If `regional` will be created as a normal, standalone DB.
If `global`, will be made part of a Global cluster (requires `global_cluster_identifier`). | `string` | `"regional"` | no |
| [context](#input\_context) | Single 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` |
{| no | | [copy\_tags\_to\_snapshot](#input\_copy\_tags\_to\_snapshot) | Copy tags to backup snapshots | `bool` | `false` | no | +| [db\_cluster\_instance\_class](#input\_db\_cluster\_instance\_class) | This setting is required to create a provisioned Multi-AZ DB cluster | `string` | `null` | no | | [db\_name](#input\_db\_name) | Database name (default is not to create a database) | `string` | `""` | no | | [db\_port](#input\_db\_port) | Database port | `number` | `3306` | no | | [deletion\_protection](#input\_deletion\_protection) | If the DB instance should have deletion protection enabled | `bool` | `false` | no | diff --git a/docs/terraform.md b/docs/terraform.md index 4b9eae6a..62546273 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -76,6 +76,7 @@ | [cluster\_type](#input\_cluster\_type) | Either `regional` or `global`.
"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 | | [copy\_tags\_to\_snapshot](#input\_copy\_tags\_to\_snapshot) | Copy tags to backup snapshots | `bool` | `false` | no | +| [db\_cluster\_instance\_class](#input\_db\_cluster\_instance\_class) | This setting is required to create a provisioned Multi-AZ DB cluster | `string` | `null` | no | | [db\_name](#input\_db\_name) | Database name (default is not to create a database) | `string` | `""` | no | | [db\_port](#input\_db\_port) | Database port | `number` | `3306` | no | | [deletion\_protection](#input\_deletion\_protection) | If the DB instance should have deletion protection enabled | `bool` | `false` | no | diff --git a/main.tf b/main.tf index bcb8d267..647aa4fd 100644 --- a/main.tf +++ b/main.tf @@ -80,6 +80,7 @@ resource "aws_rds_cluster" "primary" { final_snapshot_identifier = var.cluster_identifier == "" ? lower(module.this.id) : lower(var.cluster_identifier) skip_final_snapshot = var.skip_final_snapshot apply_immediately = var.apply_immediately + db_cluster_instance_class = local.is_serverless ? null : var.db_cluster_instance_class storage_encrypted = local.is_serverless ? null : var.storage_encrypted storage_type = var.storage_type iops = var.iops diff --git a/variables.tf b/variables.tf index 0873310d..08ac96cb 100644 --- a/variables.tf +++ b/variables.tf @@ -110,6 +110,12 @@ variable "instance_parameters" { description = "List of DB instance parameters to apply" } +variable "db_cluster_instance_class" { + type = string + default = null + description = "This setting is required to create a provisioned Multi-AZ DB cluster" +} + variable "cluster_family" { type = string default = "aurora5.6"
"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
}