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
feat!: Replace random password generation with manage master password, min AWS provider version increased to 5.0, id output replaced with identifier (#489)
Copy file name to clipboardExpand all lines: README.md
+14-21Lines changed: 14 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Root module calls these modules which can also be used separately to create inde
15
15
16
16
```hcl
17
17
module "db" {
18
-
source = "terraform-aws-modules/rds/aws"
18
+
source = "terraform-aws-modules/rds/aws"
19
19
20
20
identifier = "demodb"
21
21
@@ -37,8 +37,8 @@ module "db" {
37
37
38
38
# Enhanced Monitoring - see example for details on how to create the role
39
39
# by yourself, in case you don't want to create it automatically
40
-
monitoring_interval = "30"
41
-
monitoring_role_name = "MyRDSMonitoringRole"
40
+
monitoring_interval = "30"
41
+
monitoring_role_name = "MyRDSMonitoringRole"
42
42
create_monitoring_role = true
43
43
44
44
tags = {
@@ -61,11 +61,11 @@ module "db" {
61
61
62
62
parameters = [
63
63
{
64
-
name = "character_set_client"
64
+
name = "character_set_client"
65
65
value = "utf8mb4"
66
66
},
67
67
{
68
-
name = "character_set_server"
68
+
name = "character_set_server"
69
69
value = "utf8mb4"
70
70
}
71
71
]
@@ -201,23 +201,19 @@ Users have the ability to:
201
201
## Notes
202
202
203
203
1. This module does not create RDS security group. Use [terraform-aws-security-group](https://github.com/terraform-aws-modules/terraform-aws-security-group) module for this.
204
-
2. By default, the variable `create_random_password` is set to true. Therefore, even if the user provides a password, it will not be read. The `create_random_password` variable should be set to false and the `password` variable should have a non-null value to be read and used.
205
-
3. For an RDS instance with `storage_type` using `gp3`, be aware that `iops` and `storage_throughput` cannot be specified if the `allocated_storage` value is below a per-`engine` threshold. See the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#gp3-storage) for details.
204
+
2. For an RDS instance with `storage_type` using `gp3`, be aware that `iops` and `storage_throughput` cannot be specified if the `allocated_storage` value is below a per-`engine` threshold. See the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#gp3-storage) for details.
206
205
207
206
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
| <aname="input_create_db_parameter_group"></a> [create\_db\_parameter\_group](#input\_create\_db\_parameter\_group)| Whether to create a database parameter group |`bool`|`true`| no |
258
252
| <aname="input_create_db_subnet_group"></a> [create\_db\_subnet\_group](#input\_create\_db\_subnet\_group)| Whether to create a database subnet group |`bool`|`false`| no |
259
253
| <aname="input_create_monitoring_role"></a> [create\_monitoring\_role](#input\_create\_monitoring\_role)| Create IAM role with a defined name that permits RDS to send enhanced monitoring metrics to CloudWatch Logs |`bool`|`false`| no |
260
-
| <aname="input_create_random_password"></a> [create\_random\_password](#input\_create\_random\_password)| Whether to create random password for RDS primary cluster |`bool`|`true`| no |
261
254
| <aname="input_custom_iam_instance_profile"></a> [custom\_iam\_instance\_profile](#input\_custom\_iam\_instance\_profile)| RDS custom iam instance profile |`string`|`null`| no |
262
255
| <aname="input_db_instance_tags"></a> [db\_instance\_tags](#input\_db\_instance\_tags)| Additional tags for the DB instance |`map(string)`|`{}`| no |
263
256
| <aname="input_db_name"></a> [db\_name](#input\_db\_name)| The DB name to create. If omitted, no database is created initially |`string`|`null`| no |
@@ -285,6 +278,8 @@ Users have the ability to:
285
278
| <aname="input_license_model"></a> [license\_model](#input\_license\_model)| License model information for this DB instance. Optional, but required for some DB engines, i.e. Oracle SE1 |`string`|`null`| no |
286
279
| <aname="input_maintenance_window"></a> [maintenance\_window](#input\_maintenance\_window)| The window to perform maintenance in. Syntax: 'ddd:hh24:mi-ddd:hh24:mi'. Eg: 'Mon:00:00-Mon:03:00' |`string`|`null`| no |
287
280
| <aname="input_major_engine_version"></a> [major\_engine\_version](#input\_major\_engine\_version)| Specifies the major version of the engine that this option group should be associated with |`string`|`null`| no |
281
+
| <aname="input_manage_master_user_password"></a> [manage\_master\_user\_password](#input\_manage\_master\_user\_password)| Set to true to allow RDS to manage the master user password in Secrets Manager |`bool`|`true`| no |
282
+
| <aname="input_master_user_secret_kms_key_id"></a> [master\_user\_secret\_kms\_key\_id](#input\_master\_user\_secret\_kms\_key\_id)| The key ARN, key ID, alias ARN or alias name for the KMS key to encrypt the master user password secret in Secrets Manager.<br> If not specified, the default KMS key for your Amazon Web Services account is used. |`string`|`null`| no |
288
283
| <aname="input_max_allocated_storage"></a> [max\_allocated\_storage](#input\_max\_allocated\_storage)| Specifies the value for Storage Autoscaling |`number`|`0`| no |
289
284
| <aname="input_monitoring_interval"></a> [monitoring\_interval](#input\_monitoring\_interval)| The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collecting Enhanced Monitoring metrics, specify 0. The default is 0. Valid Values: 0, 1, 5, 10, 15, 30, 60 |`number`|`0`| no |
290
285
| <aname="input_monitoring_role_arn"></a> [monitoring\_role\_arn](#input\_monitoring\_role\_arn)| The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. Must be specified if monitoring\_interval is non-zero |`string`|`null`| no |
@@ -304,14 +299,13 @@ Users have the ability to:
304
299
| <aname="input_parameter_group_name"></a> [parameter\_group\_name](#input\_parameter\_group\_name)| Name of the DB parameter group to associate or create |`string`|`null`| no |
305
300
| <aname="input_parameter_group_use_name_prefix"></a> [parameter\_group\_use\_name\_prefix](#input\_parameter\_group\_use\_name\_prefix)| Determines whether to use `parameter_group_name` as is or create a unique name beginning with the `parameter_group_name` as the prefix |`bool`|`true`| no |
306
301
| <aname="input_parameters"></a> [parameters](#input\_parameters)| A list of DB parameters (map) to apply |`list(map(string))`|`[]`| no |
307
-
| <aname="input_password"></a> [password](#input\_password)| Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file.<br> The password provided will not be used if the variable create\_random\_password is set to true. |`string`|`null`| no |
302
+
| <aname="input_password"></a> [password](#input\_password)| Password for the master DB user. Note that this may show up in logs, and it will be stored in the state file.<br> The password provided will not be used if `manage_master_user_password` is set to true. |`string`|`null`| no |
308
303
| <aname="input_performance_insights_enabled"></a> [performance\_insights\_enabled](#input\_performance\_insights\_enabled)| Specifies whether Performance Insights are enabled |`bool`|`false`| no |
309
304
| <aname="input_performance_insights_kms_key_id"></a> [performance\_insights\_kms\_key\_id](#input\_performance\_insights\_kms\_key\_id)| The ARN for the KMS key to encrypt Performance Insights data |`string`|`null`| no |
310
305
| <aname="input_performance_insights_retention_period"></a> [performance\_insights\_retention\_period](#input\_performance\_insights\_retention\_period)| The amount of time in days to retain Performance Insights data. Valid values are `7`, `731` (2 years) or a multiple of `31`|`number`|`7`| no |
311
306
| <aname="input_port"></a> [port](#input\_port)| The port on which the DB accepts connections |`string`|`null`| no |
312
307
| <aname="input_publicly_accessible"></a> [publicly\_accessible](#input\_publicly\_accessible)| Bool to control if instance is publicly accessible |`bool`|`false`| no |
313
308
| <aname="input_putin_khuylo"></a> [putin\_khuylo](#input\_putin\_khuylo)| Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo!|`bool`|`true`| no |
314
-
| <aname="input_random_password_length"></a> [random\_password\_length](#input\_random\_password\_length)| Length of random password to create |`number`|`16`| no |
315
309
| <aname="input_replica_mode"></a> [replica\_mode](#input\_replica\_mode)| Specifies whether the replica is in either mounted or open-read-only mode. This attribute is only supported by Oracle instances. Oracle replicas operate in open-read-only mode unless otherwise specified |`string`|`null`| no |
316
310
| <aname="input_replicate_source_db"></a> [replicate\_source\_db](#input\_replicate\_source\_db)| Specifies that this resource is a Replicate database, and to use this value as the source database. This correlates to the identifier of another Amazon RDS Database to replicate |`string`|`null`| no |
317
311
| <aname="input_restore_to_point_in_time"></a> [restore\_to\_point\_in\_time](#input\_restore\_to\_point\_in\_time)| Restore to a point in time (MySQL is NOT supported) |`map(string)`|`null`| no |
@@ -338,14 +332,13 @@ Users have the ability to:
338
332
| <aname="output_db_instance_ca_cert_identifier"></a> [db\_instance\_ca\_cert\_identifier](#output\_db\_instance\_ca\_cert\_identifier)| Specifies the identifier of the CA certificate for the DB instance |
339
333
| <aname="output_db_instance_cloudwatch_log_groups"></a> [db\_instance\_cloudwatch\_log\_groups](#output\_db\_instance\_cloudwatch\_log\_groups)| Map of CloudWatch log groups created and their attributes |
340
334
| <aname="output_db_instance_domain"></a> [db\_instance\_domain](#output\_db\_instance\_domain)| The ID of the Directory Service Active Directory domain the instance is joined to |
341
-
| <aname="output_db_instance_domain_iam_role_name"></a> [db\_instance\_domain\_iam\_role\_name](#output\_db\_instance\_domain\_iam\_role\_name)| The name of the IAM role to be used when making API calls to the Directory Service.|
335
+
| <aname="output_db_instance_domain_iam_role_name"></a> [db\_instance\_domain\_iam\_role\_name](#output\_db\_instance\_domain\_iam\_role\_name)| The name of the IAM role to be used when making API calls to the Directory Service |
342
336
| <aname="output_db_instance_endpoint"></a> [db\_instance\_endpoint](#output\_db\_instance\_endpoint)| The connection endpoint |
343
337
| <aname="output_db_instance_engine"></a> [db\_instance\_engine](#output\_db\_instance\_engine)| The database engine |
344
338
| <aname="output_db_instance_engine_version_actual"></a> [db\_instance\_engine\_version\_actual](#output\_db\_instance\_engine\_version\_actual)| The running version of the database |
345
339
| <aname="output_db_instance_hosted_zone_id"></a> [db\_instance\_hosted\_zone\_id](#output\_db\_instance\_hosted\_zone\_id)| The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record) |
346
-
| <aname="output_db_instance_id"></a> [db\_instance\_id](#output\_db\_instance\_id)| The RDS instance ID|
340
+
| <aname="output_db_instance_identifier"></a> [db\_instance\_identifier](#output\_db\_instance\_identifier)| The RDS instance identifier|
347
341
| <aname="output_db_instance_name"></a> [db\_instance\_name](#output\_db\_instance\_name)| The database name |
348
-
| <aname="output_db_instance_password"></a> [db\_instance\_password](#output\_db\_instance\_password)| The database password (this password may be old, because Terraform doesn't track it after initial creation) |
349
342
| <aname="output_db_instance_port"></a> [db\_instance\_port](#output\_db\_instance\_port)| The database port |
350
343
| <aname="output_db_instance_resource_id"></a> [db\_instance\_resource\_id](#output\_db\_instance\_resource\_id)| The RDS Resource ID of this instance |
351
344
| <aname="output_db_instance_status"></a> [db\_instance\_status](#output\_db\_instance\_status)| The RDS instance status |
| <aname="output_db_instance_engine"></a> [db\_instance\_engine](#output\_db\_instance\_engine)| The database engine |
68
68
| <aname="output_db_instance_engine_version_actual"></a> [db\_instance\_engine\_version\_actual](#output\_db\_instance\_engine\_version\_actual)| The running version of the database |
69
69
| <aname="output_db_instance_hosted_zone_id"></a> [db\_instance\_hosted\_zone\_id](#output\_db\_instance\_hosted\_zone\_id)| The canonical hosted zone ID of the DB instance (to be used in a Route 53 Alias record) |
70
-
| <aname="output_db_instance_id"></a> [db\_instance\_id](#output\_db\_instance\_id)| The RDS instance ID|
70
+
| <aname="output_db_instance_identifier"></a> [db\_instance\_identifier](#output\_db\_instance\_identifier)| The RDS instance identifier|
71
71
| <aname="output_db_instance_name"></a> [db\_instance\_name](#output\_db\_instance\_name)| The database name |
72
-
| <aname="output_db_instance_password"></a> [db\_instance\_password](#output\_db\_instance\_password)| The database password (this password may be old, because Terraform doesn't track it after initial creation) |
73
72
| <aname="output_db_instance_port"></a> [db\_instance\_port](#output\_db\_instance\_port)| The database port |
74
73
| <aname="output_db_instance_resource_id"></a> [db\_instance\_resource\_id](#output\_db\_instance\_resource\_id)| The RDS Resource ID of this instance |
75
74
| <aname="output_db_instance_status"></a> [db\_instance\_status](#output\_db\_instance\_status)| The RDS instance status |
0 commit comments