You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -224,6 +224,7 @@ Available targets:
224
224
| associate\_security\_group\_ids | The IDs of the existing security groups to associate with the DB instance |`list(string)`|`[]`| no |
225
225
| attributes | Additional attributes (e.g. `1`) |`list(string)`|`[]`| no |
226
226
| auto\_minor\_version\_upgrade | Allow automated minor version upgrade (e.g. from Postgres 9.5.3 to Postgres 9.5.4) |`bool`|`true`| no |
227
+
| availability\_zone | The AZ for the RDS instance. Specify one of `subnet_ids`, `db_subnet_group_name` or `availability_zone`. If `availability_zone` is provided, the instance will be placed into the default VPC or EC2 Classic |`string`|`null`| no |
227
228
| backup\_retention\_period | Backup retention period in days. Must be > 0 to enable backups |`number`|`0`| no |
228
229
| backup\_window | When AWS can perform DB snapshots, can't overlap with maintenance window |`string`|`"22:00-03:00"`| no |
229
230
| ca\_cert\_identifier | The identifier of the CA certificate for the DB instance |`string`|`"rds-ca-2019"`| no |
@@ -236,6 +237,7 @@ Available targets:
236
237
| db\_options | A list of DB options to apply with an option group. Depends on DB engine | <pre>list(object({<br> db_security_group_memberships = list(string)<br> option_name = string<br> port = number<br> version = string<br> vpc_security_group_memberships = list(string)<br><br> option_settings = list(object({<br> name = string<br> value = string<br> }))<br> }))</pre> |`[]`| no |
237
238
| db\_parameter | A list of DB parameters to apply. Note that parameters may differ from a DB family to another | <pre>list(object({<br> apply_method = string<br> name = string<br> value = string<br> }))</pre> |`[]`| no |
238
239
| db\_parameter\_group | The DB parameter group family name. The value depends on DB engine used. See [DBParameterGroupFamily](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBParameterGroup.html#API_CreateDBParameterGroup_RequestParameters) for instructions on how to retrieve applicable value. |`string`| n/a | yes |
240
+
| db\_subnet\_group\_name | Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. Specify one of `subnet_ids`, `db_subnet_group_name` or `availability_zone`|`string`|`null`| no |
239
241
| deletion\_protection | Set to true to enable deletion protection on the RDS instance |`bool`|`false`| no |
240
242
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. |`string`|`null`| no |
241
243
| dns\_zone\_id | The ID of the DNS Zone in Route53 where a new DNS record will be created for the DB host name |`string`|`""`| no |
@@ -276,7 +278,7 @@ Available targets:
276
278
| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' |`string`|`null`| no |
277
279
| storage\_encrypted | (Optional) Specifies whether the DB instance is encrypted. The default is false if not specified |`bool`|`true`| no |
278
280
| storage\_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD) |`string`|`"standard"`| no |
279
-
| subnet\_ids | List of subnets for the DB|`list(string)`|n/a|yes|
281
+
| subnet\_ids | List of subnet IDs for the DB. DB instance will be created in the VPC associated with the DB subnet group provisioned using the subnet IDs. Specify one of `subnet_ids`, `db_subnet_group_name` or `availability_zone`|`list(string)`|`[]`|no|
280
282
| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')`|`map(string)`|`{}`| no |
281
283
| vpc\_id | VPC ID the DB instance will be created in |`string`| n/a | yes |
282
284
@@ -292,7 +294,7 @@ Available targets:
292
294
| option\_group\_id | ID of the Option Group |
293
295
| parameter\_group\_id | ID of the Parameter Group |
294
296
| security\_group\_id | ID of the Security Group |
295
-
| subnet\_group\_id | ID of the Subnet Group |
297
+
| subnet\_group\_id | ID of the created Subnet Group |
Copy file name to clipboardExpand all lines: docs/terraform.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,7 @@
45
45
| associate\_security\_group\_ids | The IDs of the existing security groups to associate with the DB instance |`list(string)`|`[]`| no |
46
46
| attributes | Additional attributes (e.g. `1`) |`list(string)`|`[]`| no |
47
47
| auto\_minor\_version\_upgrade | Allow automated minor version upgrade (e.g. from Postgres 9.5.3 to Postgres 9.5.4) |`bool`|`true`| no |
48
+
| availability\_zone | The AZ for the RDS instance. Specify one of `subnet_ids`, `db_subnet_group_name` or `availability_zone`. If `availability_zone` is provided, the instance will be placed into the default VPC or EC2 Classic |`string`|`null`| no |
48
49
| backup\_retention\_period | Backup retention period in days. Must be > 0 to enable backups |`number`|`0`| no |
49
50
| backup\_window | When AWS can perform DB snapshots, can't overlap with maintenance window |`string`|`"22:00-03:00"`| no |
50
51
| ca\_cert\_identifier | The identifier of the CA certificate for the DB instance |`string`|`"rds-ca-2019"`| no |
@@ -57,6 +58,7 @@
57
58
| db\_options | A list of DB options to apply with an option group. Depends on DB engine | <pre>list(object({<br> db_security_group_memberships = list(string)<br> option_name = string<br> port = number<br> version = string<br> vpc_security_group_memberships = list(string)<br><br> option_settings = list(object({<br> name = string<br> value = string<br> }))<br> }))</pre> |`[]`| no |
58
59
| db\_parameter | A list of DB parameters to apply. Note that parameters may differ from a DB family to another | <pre>list(object({<br> apply_method = string<br> name = string<br> value = string<br> }))</pre> |`[]`| no |
59
60
| db\_parameter\_group | The DB parameter group family name. The value depends on DB engine used. See [DBParameterGroupFamily](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBParameterGroup.html#API_CreateDBParameterGroup_RequestParameters) for instructions on how to retrieve applicable value. |`string`| n/a | yes |
61
+
| db\_subnet\_group\_name | Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. Specify one of `subnet_ids`, `db_subnet_group_name` or `availability_zone`|`string`|`null`| no |
60
62
| deletion\_protection | Set to true to enable deletion protection on the RDS instance |`bool`|`false`| no |
61
63
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. |`string`|`null`| no |
62
64
| dns\_zone\_id | The ID of the DNS Zone in Route53 where a new DNS record will be created for the DB host name |`string`|`""`| no |
@@ -97,7 +99,7 @@
97
99
| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' |`string`|`null`| no |
98
100
| storage\_encrypted | (Optional) Specifies whether the DB instance is encrypted. The default is false if not specified |`bool`|`true`| no |
99
101
| storage\_type | One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD) |`string`|`"standard"`| no |
100
-
| subnet\_ids | List of subnets for the DB|`list(string)`|n/a|yes|
102
+
| subnet\_ids | List of subnet IDs for the DB. DB instance will be created in the VPC associated with the DB subnet group provisioned using the subnet IDs. Specify one of `subnet_ids`, `db_subnet_group_name` or `availability_zone`|`list(string)`|`[]`|no|
101
103
| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')`|`map(string)`|`{}`| no |
102
104
| vpc\_id | VPC ID the DB instance will be created in |`string`| n/a | yes |
103
105
@@ -113,5 +115,5 @@
113
115
| option\_group\_id | ID of the Option Group |
114
116
| parameter\_group\_id | ID of the Parameter Group |
115
117
| security\_group\_id | ID of the Security Group |
116
-
| subnet\_group\_id | ID of the Subnet Group |
118
+
| subnet\_group\_id | ID of the created Subnet Group |
Copy file name to clipboardExpand all lines: examples/complete/variables.tf
+12
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,18 @@ variable "multi_az" {
37
37
description="Set to true if multi AZ deployment must be supported"
38
38
}
39
39
40
+
variable"availability_zone" {
41
+
type=string
42
+
default=null
43
+
description="The AZ for the RDS instance. Specify one of `subnet_ids`, `db_subnet_group_name` or `availability_zone`. If `availability_zone` is provided, the instance will be placed into the default VPC or EC2 Classic"
44
+
}
45
+
46
+
variable"db_subnet_group_name" {
47
+
type=string
48
+
default=null
49
+
description="Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. Specify one of `subnet_ids`, `db_subnet_group_name` or `availability_zone`"
50
+
}
51
+
40
52
variable"storage_type" {
41
53
type=string
42
54
description="One of 'standard' (magnetic), 'gp2' (general purpose SSD), or 'io1' (provisioned IOPS SSD)"
0 commit comments