Skip to content

Commit 696f58f

Browse files
committed
chore: Update UPGRADE guide and examples following validation
1 parent e7180d6 commit 696f58f

File tree

12 files changed

+331
-183
lines changed

12 files changed

+331
-183
lines changed

README.md

Lines changed: 104 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -62,124 +62,127 @@ module "cluster" {
6262

6363
There are a couple different configuration methods that can be used to create instances within the cluster:
6464

65-
ℹ️ Only the pertinent attributes are shown for brevity
65+
> [!NOTE]
66+
> Only the pertinent attributes are shown for brevity
6667
67-
1. Create homogenous cluster of any number of instances
68+
1. Create homogenous cluster of any number of instances
6869

69-
- Resources created:
70-
- Writer: 1
71-
- Reader(s): 2
70+
- Resources created:
71+
- Writer: 1
72+
- Reader(s): 2
7273

73-
```hcl
74-
instance_class = "db.r8g.large"
75-
instances = {
76-
one = {}
77-
two = {}
78-
three = {}
79-
}
80-
```
74+
```hcl
75+
cluster_instance_class = "db.r8g.large"
76+
instances = {
77+
one = {}
78+
two = {}
79+
three = {}
80+
}
81+
```
8182

8283
2. Create homogenous cluster of instances w/ autoscaling enabled. This is redundant and we'll show why in the next example.
8384

84-
- Resources created:
85-
- Writer: 1
86-
- Reader(s):
87-
- At least 4 readers (2 created directly, 2 created by appautoscaling)
88-
- At most 7 reader instances (2 created directly, 5 created by appautoscaling)
89-
90-
ℹ️ Autoscaling uses the instance class specified by `instance_class`.
91-
92-
```hcl
93-
instance_class = "db.r8g.large"
94-
instances = {
95-
one = {}
96-
two = {}
97-
three = {}
98-
}
85+
- Resources created:
86+
- Writer: 1
87+
- Reader(s):
88+
- At least 4 readers (2 created directly, 2 created by appautoscaling)
89+
- At most 7 reader instances (2 created directly, 5 created by appautoscaling)
90+
91+
> [!NOTE]
92+
> Autoscaling uses the instance class specified by `cluster_instance_class`.
93+
94+
```hcl
95+
cluster_instance_class = "db.r8g.large"
96+
instances = {
97+
one = {}
98+
two = {}
99+
three = {}
100+
}
99101
100-
autoscaling_enabled = true
101-
autoscaling_min_capacity = 2
102-
autoscaling_max_capacity = 5
103-
```
102+
autoscaling_enabled = true
103+
autoscaling_min_capacity = 2
104+
autoscaling_max_capacity = 5
105+
```
104106

105107
3. Create homogeneous cluster scaled via autoscaling. At least one instance (writer) is required
106108

107-
- Resources created:
108-
- Writer: 1
109-
- Reader(s):
110-
- At least 1 reader
111-
- At most 5 readers
109+
- Resources created:
110+
- Writer: 1
111+
- Reader(s):
112+
- At least 1 reader
113+
- At most 5 readers
112114

113-
```hcl
114-
instance_class = "db.r8g.large"
115-
instances = {
116-
one = {}
117-
}
115+
```hcl
116+
cluster_instance_class = "db.r8g.large"
117+
instances = {
118+
one = {}
119+
}
118120
119-
autoscaling_enabled = true
120-
autoscaling_min_capacity = 1
121-
autoscaling_max_capacity = 5
122-
```
121+
autoscaling_enabled = true
122+
autoscaling_min_capacity = 1
123+
autoscaling_max_capacity = 5
124+
```
123125

124126
4. Create heterogenous cluster to support mixed-use workloads
125127

126128
It is common in this configuration to independently control the instance `promotion_tier` paired with `endpoints` to create custom endpoints directed at select instances or instance groups.
127129

128-
- Resources created:
129-
- Writer: 1
130-
- Readers: 2
131-
132-
```hcl
133-
instance_class = "db.r5.large"
134-
instances = {
135-
one = {
136-
instance_class = "db.r5.2xlarge"
137-
publicly_accessible = true
130+
- Resources created:
131+
- Writer: 1
132+
- Readers: 2
133+
134+
```hcl
135+
cluster_instance_class = "db.r8g.large"
136+
instances = {
137+
one = {
138+
instance_class = "db.r8g.2xlarge"
139+
publicly_accessible = true
140+
}
141+
two = {
142+
identifier = "static-member-1"
143+
instance_class = "db.r8g.2xlarge"
144+
}
145+
three = {
146+
identifier = "excluded-member-1"
147+
instance_class = "db.r8g.large"
148+
promotion_tier = 15
149+
}
138150
}
139-
two = {
140-
identifier = "static-member-1"
141-
instance_class = "db.r5.2xlarge"
142-
}
143-
three = {
144-
identifier = "excluded-member-1"
145-
instance_class = "db.r5.large"
146-
promotion_tier = 15
147-
}
148-
}
149-
```
151+
```
150152

151153
5. Create heterogenous cluster to support mixed-use workloads w/ autoscaling enabled
152154

153-
- Resources created:
154-
- Writer: 1
155-
- Reader(s):
156-
- At least 3 readers (2 created directly, 1 created through appautoscaling)
157-
- At most 7 readers (2 created directly, 5 created through appautoscaling)
158-
159-
ℹ️ Autoscaling uses the instance class specified by `instance_class`.
160-
161-
```hcl
162-
instance_class = "db.r5.large"
163-
instances = {
164-
one = {
165-
instance_class = "db.r5.2xlarge"
166-
publicly_accessible = true
155+
- Resources created:
156+
- Writer: 1
157+
- Reader(s):
158+
- At least 3 readers (2 created directly, 1 created through appautoscaling)
159+
- At most 7 readers (2 created directly, 5 created through appautoscaling)
160+
161+
> [!NOTE]
162+
> Autoscaling uses the instance class specified by `cluster_instance_class`.
163+
164+
```hcl
165+
cluster_instance_class = "db.r8g.large"
166+
instances = {
167+
one = {
168+
instance_class = "db.r8g.2xlarge"
169+
publicly_accessible = true
170+
}
171+
two = {
172+
identifier = "static-member-1"
173+
instance_class = "db.r8g.2xlarge"
174+
}
175+
three = {
176+
identifier = "excluded-member-1"
177+
instance_class = "db.r8g.large"
178+
promotion_tier = 15
179+
}
167180
}
168-
two = {
169-
identifier = "static-member-1"
170-
instance_class = "db.r5.2xlarge"
171-
}
172-
three = {
173-
identifier = "excluded-member-1"
174-
instance_class = "db.r5.large"
175-
promotion_tier = 15
176-
}
177-
}
178181
179-
autoscaling_enabled = true
180-
autoscaling_min_capacity = 1
181-
autoscaling_max_capacity = 5
182-
```
182+
autoscaling_enabled = true
183+
autoscaling_min_capacity = 1
184+
autoscaling_max_capacity = 5
185+
```
183186

184187
## Conditional Creation
185188

@@ -291,6 +294,8 @@ No modules.
291294
| <a name="input_cloudwatch_log_group_tags"></a> [cloudwatch\_log\_group\_tags](#input\_cloudwatch\_log\_group\_tags) | Additional tags for the CloudWatch log group(s) | `map(string)` | `{}` | no |
292295
| <a name="input_cluster_activity_stream"></a> [cluster\_activity\_stream](#input\_cluster\_activity\_stream) | Map of arguments for the created DB cluster activity stream | <pre>object({<br/> include_audit_fields = optional(bool, false)<br/> kms_key_id = string<br/> mode = string<br/> })</pre> | `null` | no |
293296
| <a name="input_cluster_ca_cert_identifier"></a> [cluster\_ca\_cert\_identifier](#input\_cluster\_ca\_cert\_identifier) | The CA certificate identifier to use for the DB cluster's server certificate. Currently only supported for multi-az DB clusters | `string` | `null` | no |
297+
| <a name="input_cluster_db_instance_parameter_group_name"></a> [cluster\_db\_instance\_parameter\_group\_name](#input\_cluster\_db\_instance\_parameter\_group\_name) | Instance parameter group to associate with all instances of the DB cluster. The `cluster_db_instance_parameter_group_name` is only valid in combination with `allow_major_version_upgrade` | `string` | `null` | no |
298+
| <a name="input_cluster_instance_class"></a> [cluster\_instance\_class](#input\_cluster\_instance\_class) | The compute and memory capacity of each DB instance in the Multi-AZ DB cluster (not all DB instance classes are available in all AWS Regions, or for all database engines) | `string` | `null` | no |
294299
| <a name="input_cluster_members"></a> [cluster\_members](#input\_cluster\_members) | List of RDS Instances that are a part of this cluster | `list(string)` | `null` | no |
295300
| <a name="input_cluster_monitoring_interval"></a> [cluster\_monitoring\_interval](#input\_cluster\_monitoring\_interval) | Interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. To turn off collecting Enhanced Monitoring metrics, specify 0. Valid Values: 0, 1, 5, 10, 15, 30, 60 | `number` | `0` | no |
296301
| <a name="input_cluster_parameter_group"></a> [cluster\_parameter\_group](#input\_cluster\_parameter\_group) | Map of nested arguments for the created DB cluster parameter group | <pre>object({<br/> name = optional(string)<br/> use_name_prefix = optional(bool, true)<br/> description = optional(string)<br/> family = string<br/> parameters = optional(list(object({<br/> name = string<br/> value = string<br/> apply_method = optional(string, "immediate")<br/> })))<br/> })</pre> | `null` | no |
@@ -310,8 +315,6 @@ No modules.
310315
| <a name="input_create_security_group"></a> [create\_security\_group](#input\_create\_security\_group) | Determines whether to create security group for RDS cluster | `bool` | `true` | no |
311316
| <a name="input_database_insights_mode"></a> [database\_insights\_mode](#input\_database\_insights\_mode) | The mode of Database Insights to enable for the DB cluster. Valid values: standard, advanced | `string` | `null` | no |
312317
| <a name="input_database_name"></a> [database\_name](#input\_database\_name) | Name for an automatically created database on cluster creation | `string` | `null` | no |
313-
| <a name="input_db_cluster_db_instance_parameter_group_name"></a> [db\_cluster\_db\_instance\_parameter\_group\_name](#input\_db\_cluster\_db\_instance\_parameter\_group\_name) | Instance parameter group to associate with all instances of the DB cluster. The `db_cluster_db_instance_parameter_group_name` is only valid in combination with `allow_major_version_upgrade` | `string` | `null` | no |
314-
| <a name="input_db_cluster_instance_class"></a> [db\_cluster\_instance\_class](#input\_db\_cluster\_instance\_class) | The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example db.m6g.xlarge. Not all DB instance classes are available in all AWS Regions, or for all database engines | `string` | `null` | no |
315318
| <a name="input_db_parameter_group"></a> [db\_parameter\_group](#input\_db\_parameter\_group) | Map of nested arguments for the created DB parameter group | <pre>object({<br/> name = optional(string)<br/> use_name_prefix = optional(bool, true)<br/> description = optional(string)<br/> family = string<br/> parameters = optional(list(object({<br/> name = string<br/> value = string<br/> apply_method = optional(string, "immediate")<br/> })))<br/> })</pre> | `null` | no |
316319
| <a name="input_db_subnet_group_name"></a> [db\_subnet\_group\_name](#input\_db\_subnet\_group\_name) | The name of the subnet group name (existing or created) | `string` | `""` | no |
317320
| <a name="input_delete_automated_backups"></a> [delete\_automated\_backups](#input\_delete\_automated\_backups) | Specifies whether to remove automated backups immediately after the DB cluster is deleted | `bool` | `null` | no |
@@ -322,7 +325,7 @@ No modules.
322325
| <a name="input_enable_http_endpoint"></a> [enable\_http\_endpoint](#input\_enable\_http\_endpoint) | Enable HTTP endpoint (data API). Only valid when engine\_mode is set to `serverless` | `bool` | `null` | no |
323326
| <a name="input_enable_local_write_forwarding"></a> [enable\_local\_write\_forwarding](#input\_enable\_local\_write\_forwarding) | Whether read replicas can forward write operations to the writer DB instance in the DB cluster. By default, write operations aren't allowed on reader DB instances | `bool` | `null` | no |
324327
| <a name="input_enabled_cloudwatch_logs_exports"></a> [enabled\_cloudwatch\_logs\_exports](#input\_enabled\_cloudwatch\_logs\_exports) | Set of log types to export to cloudwatch. If omitted, no logs will be exported. The following log types are supported: `audit`, `error`, `general`, `slowquery`, `postgresql` | `list(string)` | `[]` | no |
325-
| <a name="input_endpoints"></a> [endpoints](#input\_endpoints) | Map of additional cluster endpoints and their attributes to be created | <pre>map(object({<br/> cluster_endpoint_identifier = string<br/> custom_endpoint_type = string<br/> excluded_members = optional(list(string))<br/> static_members = optional(list(string))<br/> tags = optional(map(string), {})<br/> }))</pre> | `{}` | no |
328+
| <a name="input_endpoints"></a> [endpoints](#input\_endpoints) | Map of additional cluster endpoints and their attributes to be created | <pre>map(object({<br/> identifier = string<br/> type = string<br/> excluded_members = optional(list(string))<br/> static_members = optional(list(string))<br/> tags = optional(map(string), {})<br/> }))</pre> | `{}` | no |
326329
| <a name="input_engine"></a> [engine](#input\_engine) | The name of the database engine to be used for this DB cluster. Defaults to `aurora`. Valid Values: `aurora`, `aurora-mysql`, `aurora-postgresql` | `string` | `null` | no |
327330
| <a name="input_engine_lifecycle_support"></a> [engine\_lifecycle\_support](#input\_engine\_lifecycle\_support) | The life cycle type for this DB instance. This setting is valid for cluster types Aurora DB clusters and Multi-AZ DB clusters. Valid values are `open-source-rds-extended-support`, `open-source-rds-extended-support-disabled`. Default value is `open-source-rds-extended-support` | `string` | `null` | no |
328331
| <a name="input_engine_mode"></a> [engine\_mode](#input\_engine\_mode) | The database engine mode. Valid values: `global`, `multimaster`, `parallelquery`, `provisioned`, `serverless`. Defaults to: `provisioned` | `string` | `"provisioned"` | no |
@@ -433,6 +436,6 @@ Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraf
433436

434437
## Additional information for users from Russia and Belarus
435438

436-
- Russia has [illegally annexed Crimea in 2014](https://en.wikipedia.org/wiki/Annexation_of_Crimea_by_the_Russian_Federation) and [brought the war in Donbas](https://en.wikipedia.org/wiki/War_in_Donbas) followed by [full-scale invasion of Ukraine in 2022](https://en.wikipedia.org/wiki/2022_Russian_invasion_of_Ukraine).
437-
- Russia has brought sorrow and devastations to millions of Ukrainians, killed hundreds of innocent people, damaged thousands of buildings, and forced several million people to flee.
438-
- [Putin khuylo!](https://en.wikipedia.org/wiki/Putin_khuylo!)
439+
* Russia has [illegally annexed Crimea in 2014](https://en.wikipedia.org/wiki/Annexation_of_Crimea_by_the_Russian_Federation) and [brought the war in Donbas](https://en.wikipedia.org/wiki/War_in_Donbas) followed by [full-scale invasion of Ukraine in 2022](https://en.wikipedia.org/wiki/2022_Russian_invasion_of_Ukraine).
440+
* Russia has brought sorrow and devastations to millions of Ukrainians, killed hundreds of innocent people, damaged thousands of buildings, and forced several million people to flee.
441+
* [Putin khuylo!](https://en.wikipedia.org/wiki/Putin_khuylo!)

0 commit comments

Comments
 (0)