@@ -64,10 +64,12 @@ There are a couple different configuration methods that can be used to create in
64
64
- Reader(s): 2
65
65
66
66
``` hcl
67
- ...
68
67
instance_class = "db.r6g.large"
69
- instances = { for i in range(3) : i => {} }
70
- ...
68
+ instances = {
69
+ one = {}
70
+ two = {}
71
+ three = {}
72
+ }
71
73
```
72
74
73
75
2 . Create homogenous cluster of instances w/ autoscaling enabled. This is redundant and we'll show why in the next example.
@@ -81,14 +83,16 @@ There are a couple different configuration methods that can be used to create in
81
83
ℹ️ Autoscaling uses the instance class specified by ` instance_class ` .
82
84
83
85
``` hcl
84
- ...
85
86
instance_class = "db.r6g.large"
86
- instances = { for i in range(3) : i => {} }
87
+ instances = {
88
+ one = {}
89
+ two = {}
90
+ three = {}
91
+ }
87
92
88
93
autoscaling_enabled = true
89
94
autoscaling_min_capacity = 2
90
95
autoscaling_max_capacity = 5
91
- ...
92
96
```
93
97
94
98
3 . Create homogeneous cluster scaled via autoscaling. At least one instance (writer) is required
@@ -100,14 +104,14 @@ There are a couple different configuration methods that can be used to create in
100
104
- At most 5 readers
101
105
102
106
``` hcl
103
- ...
104
107
instance_class = "db.r6g.large"
105
- instances = { 1 = {} }
108
+ instances = {
109
+ one = {}
110
+ }
106
111
107
112
autoscaling_enabled = true
108
113
autoscaling_min_capacity = 1
109
114
autoscaling_max_capacity = 5
110
- ...
111
115
```
112
116
113
117
4 . Create heterogenous cluster to support mixed-use workloads
@@ -119,24 +123,22 @@ There are a couple different configuration methods that can be used to create in
119
123
- Readers: 2
120
124
121
125
``` hcl
122
- ...
123
126
instance_class = "db.r5.large"
124
127
instances = {
125
- 1 = {
128
+ one = {
126
129
instance_class = "db.r5.2xlarge"
127
130
publicly_accessible = true
128
131
}
129
- 2 = {
132
+ two = {
130
133
identifier = "static-member-1"
131
134
instance_class = "db.r5.2xlarge"
132
135
}
133
- 3 = {
136
+ three = {
134
137
identifier = "excluded-member-1"
135
138
instance_class = "db.r5.large"
136
139
promotion_tier = 15
137
140
}
138
141
}
139
- ...
140
142
```
141
143
142
144
5 . Create heterogenous cluster to support mixed-use workloads w/ autoscaling enabled
@@ -150,18 +152,17 @@ There are a couple different configuration methods that can be used to create in
150
152
ℹ️ Autoscaling uses the instance class specified by ` instance_class ` .
151
153
152
154
``` hcl
153
- ...
154
155
instance_class = "db.r5.large"
155
156
instances = {
156
- 1 = {
157
+ one = {
157
158
instance_class = "db.r5.2xlarge"
158
159
publicly_accessible = true
159
160
}
160
- 2 = {
161
+ two = {
161
162
identifier = "static-member-1"
162
163
instance_class = "db.r5.2xlarge"
163
164
}
164
- 3 = {
165
+ three = {
165
166
identifier = "excluded-member-1"
166
167
instance_class = "db.r5.large"
167
168
promotion_tier = 15
@@ -171,7 +172,6 @@ There are a couple different configuration methods that can be used to create in
171
172
autoscaling_enabled = true
172
173
autoscaling_min_capacity = 1
173
174
autoscaling_max_capacity = 5
174
- ...
175
175
```
176
176
177
177
## Conditional Creation
0 commit comments