Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add reader_independent_scaling input #254

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ Available targets:
| <a name="input_rds_ri_offering_type"></a> [rds\_ri\_offering\_type](#input\_rds\_ri\_offering\_type) | Offering type of reserved DB instances. Valid values are 'No Upfront', 'Partial Upfront', 'All Upfront'. | `string` | `""` | no |
| <a name="input_rds_ri_reservation_id"></a> [rds\_ri\_reservation\_id](#input\_rds\_ri\_reservation\_id) | Customer-specified identifier to track the reservation of the reserved DB instance. | `string` | `null` | no |
| <a name="input_reader_dns_name"></a> [reader\_dns\_name](#input\_reader\_dns\_name) | Name of the reader endpoint CNAME record to create in the parent DNS zone specified by `zone_id`. If left empty, the name will be auto-asigned using the format `replicas.var.name` | `string` | `""` | no |
| <a name="input_reader_independent_scaling"></a> [reader\_independent\_scaling](#input\_reader\_independent\_scaling) | Whether to scale the readers independentl from the writer | `bool` | `false` | no |
| <a name="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.<br/>Characters matching the regex will be removed from the ID elements.<br/>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
| <a name="input_replication_source_identifier"></a> [replication\_source\_identifier](#input\_replication\_source\_identifier) | ARN of a source DB cluster or DB instance if this DB cluster is to be created as a Read Replica | `string` | `""` | no |
| <a name="input_restore_to_point_in_time"></a> [restore\_to\_point\_in\_time](#input\_restore\_to\_point\_in\_time) | List of point-in-time recovery options. Valid parameters are:<br/><br/>`source_cluster_identifier`<br/> Identifier of the source database cluster from which to restore.<br/>`restore_type`:<br/> Type of restore to be performed. Valid options are "full-copy" and "copy-on-write".<br/>`use_latest_restorable_time`:<br/> Set to true to restore the database cluster to the latest restorable backup time. Conflicts with `restore_to_time`.<br/>`restore_to_time`:<br/> Date and time in UTC format to restore the database cluster to. Conflicts with `use_latest_restorable_time`. | <pre>list(object({<br/> source_cluster_identifier = string<br/> restore_type = optional(string, "copy-on-write")<br/> use_latest_restorable_time = optional(bool, true)<br/> restore_to_time = optional(string, null)<br/> }))</pre> | `[]` | no |
Expand Down
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
| <a name="input_rds_ri_offering_type"></a> [rds\_ri\_offering\_type](#input\_rds\_ri\_offering\_type) | Offering type of reserved DB instances. Valid values are 'No Upfront', 'Partial Upfront', 'All Upfront'. | `string` | `""` | no |
| <a name="input_rds_ri_reservation_id"></a> [rds\_ri\_reservation\_id](#input\_rds\_ri\_reservation\_id) | Customer-specified identifier to track the reservation of the reserved DB instance. | `string` | `null` | no |
| <a name="input_reader_dns_name"></a> [reader\_dns\_name](#input\_reader\_dns\_name) | Name of the reader endpoint CNAME record to create in the parent DNS zone specified by `zone_id`. If left empty, the name will be auto-asigned using the format `replicas.var.name` | `string` | `""` | no |
| <a name="input_reader_independent_scaling"></a> [reader\_independent\_scaling](#input\_reader\_independent\_scaling) | Whether to scale the readers independentl from the writer | `bool` | `false` | no |
| <a name="input_regex_replace_chars"></a> [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.<br/>Characters matching the regex will be removed from the ID elements.<br/>If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
| <a name="input_replication_source_identifier"></a> [replication\_source\_identifier](#input\_replication\_source\_identifier) | ARN of a source DB cluster or DB instance if this DB cluster is to be created as a Read Replica | `string` | `""` | no |
| <a name="input_restore_to_point_in_time"></a> [restore\_to\_point\_in\_time](#input\_restore\_to\_point\_in\_time) | List of point-in-time recovery options. Valid parameters are:<br/><br/>`source_cluster_identifier`<br/> Identifier of the source database cluster from which to restore.<br/>`restore_type`:<br/> Type of restore to be performed. Valid options are "full-copy" and "copy-on-write".<br/>`use_latest_restorable_time`:<br/> Set to true to restore the database cluster to the latest restorable backup time. Conflicts with `restore_to_time`.<br/>`restore_to_time`:<br/> Date and time in UTC format to restore the database cluster to. Conflicts with `use_latest_restorable_time`. | <pre>list(object({<br/> source_cluster_identifier = string<br/> restore_type = optional(string, "copy-on-write")<br/> use_latest_restorable_time = optional(bool, true)<br/> restore_to_time = optional(string, null)<br/> }))</pre> | `[]` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ resource "aws_rds_cluster_instance" "default" {
preferred_maintenance_window = var.maintenance_window
copy_tags_to_snapshot = var.copy_tags_to_snapshot
ca_cert_identifier = var.ca_cert_identifier
promotion_tier = var.reader_independent_scaling ? 2 : 0

dynamic "timeouts" {
for_each = var.timeouts_configuration
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,11 @@ variable "performance_insights_retention_period" {
default = null
}

variable "reader_independent_scaling" {
type = bool
default = false
description = "Whether to scale the readers independentl from the writer"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "Whether to scale the readers independentl from the writer"
description = "Whether to scale the readers independently from the writer"

}
variable "autoscaling_enabled" {
type = bool
default = false
Expand Down