Skip to content

Commit cc11f09

Browse files
authored
feat: Add upgrade_rollout_order for RDS cluster, force_destroy for DSQL cluster, and master_password_wo variable adjustments (#536)
* cluster upgrade rollout order and other fixes * update upgrade docs as well
1 parent e04c5a8 commit cc11f09

38 files changed

Lines changed: 131 additions & 81 deletions

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,14 @@ Terraform documentation is generated automatically using [pre-commit hooks](http
231231

232232
| Name | Version |
233233
|------|---------|
234-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.11 |
235-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.18 |
234+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.11.1 |
235+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.26 |
236236

237237
## Providers
238238

239239
| Name | Version |
240240
|------|---------|
241-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.18 |
241+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.26 |
242242

243243
## Modules
244244

@@ -349,7 +349,7 @@ No modules.
349349
| <a name="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. Cannot be set if `master_password_wo` is provided | `bool` | `true` | no |
350350
| <a name="input_manage_master_user_password_rotation"></a> [manage\_master\_user\_password\_rotation](#input\_manage\_master\_user\_password\_rotation) | Whether to manage the master user password rotation. By default, false on creation, rotation is managed by RDS. There is not currently a way to disable this on initial creation even when set to false. Setting this value to false after previously having been set to true will disable automatic rotation | `bool` | `false` | no |
351351
| <a name="input_master_password_wo"></a> [master\_password\_wo](#input\_master\_password\_wo) | Write-Only required unless `manage_master_user_password` is set to `true`, a `snapshot_identifier`, `replication_source_identifier`, or unless a `global_cluster_identifier` is provided when the cluster is the "secondary" cluster of a global database) Password for the master DB user | `string` | `null` | no |
352-
| <a name="input_master_password_wo_version"></a> [master\_password\_wo\_version](#input\_master\_password\_wo\_version) | Used together with `master_password_wo` to trigger an update. Increment this value when an update to the `master_password_wo` is required | `string` | `null` | no |
352+
| <a name="input_master_password_wo_version"></a> [master\_password\_wo\_version](#input\_master\_password\_wo\_version) | Used together with `master_password_wo` to trigger an update. Increment this value when an update to the `master_password_wo` is required | `number` | `null` | no |
353353
| <a name="input_master_user_password_rotate_immediately"></a> [master\_user\_password\_rotate\_immediately](#input\_master\_user\_password\_rotate\_immediately) | Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window | `bool` | `null` | no |
354354
| <a name="input_master_user_password_rotation_automatically_after_days"></a> [master\_user\_password\_rotation\_automatically\_after\_days](#input\_master\_user\_password\_rotation\_automatically\_after\_days) | Specifies the number of days between automatic scheduled rotations of the secret. Either `master_user_password_rotation_automatically_after_days` or `master_user_password_rotation_schedule_expression` must be specified | `number` | `null` | no |
355355
| <a name="input_master_user_password_rotation_duration"></a> [master\_user\_password\_rotation\_duration](#input\_master\_user\_password\_rotation\_duration) | The length of the rotation window in hours. For example, 3h for a three hour window | `string` | `null` | no |
@@ -402,14 +402,14 @@ No modules.
402402
| <a name="output_cluster_hosted_zone_id"></a> [cluster\_hosted\_zone\_id](#output\_cluster\_hosted\_zone\_id) | The Route53 Hosted Zone ID of the endpoint |
403403
| <a name="output_cluster_id"></a> [cluster\_id](#output\_cluster\_id) | The RDS Cluster Identifier |
404404
| <a name="output_cluster_instances"></a> [cluster\_instances](#output\_cluster\_instances) | A map of cluster instances and their attributes |
405-
| <a name="output_cluster_master_password"></a> [cluster\_master\_password](#output\_cluster\_master\_password) | The database master password |
406405
| <a name="output_cluster_master_user_secret"></a> [cluster\_master\_user\_secret](#output\_cluster\_master\_user\_secret) | The generated database master user secret when `manage_master_user_password` is set to `true` |
407406
| <a name="output_cluster_master_username"></a> [cluster\_master\_username](#output\_cluster\_master\_username) | The database master username |
408407
| <a name="output_cluster_members"></a> [cluster\_members](#output\_cluster\_members) | List of RDS Instances that are a part of this cluster |
409408
| <a name="output_cluster_port"></a> [cluster\_port](#output\_cluster\_port) | The database port |
410409
| <a name="output_cluster_reader_endpoint"></a> [cluster\_reader\_endpoint](#output\_cluster\_reader\_endpoint) | A read-only endpoint for the cluster, automatically load-balanced across replicas |
411410
| <a name="output_cluster_resource_id"></a> [cluster\_resource\_id](#output\_cluster\_resource\_id) | The RDS Cluster Resource ID |
412411
| <a name="output_cluster_role_associations"></a> [cluster\_role\_associations](#output\_cluster\_role\_associations) | A map of IAM roles associated with the cluster and their attributes |
412+
| <a name="output_cluster_upgrade_rollout_order"></a> [cluster\_upgrade\_rollout\_order](#output\_cluster\_upgrade\_rollout\_order) | Order in which the clusters are upgraded (first, second, last) |
413413
| <a name="output_db_cluster_activity_stream_kinesis_stream_name"></a> [db\_cluster\_activity\_stream\_kinesis\_stream\_name](#output\_db\_cluster\_activity\_stream\_kinesis\_stream\_name) | The name of the Amazon Kinesis data stream to be used for the database activity stream |
414414
| <a name="output_db_cluster_cloudwatch_log_groups"></a> [db\_cluster\_cloudwatch\_log\_groups](#output\_db\_cluster\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
415415
| <a name="output_db_cluster_parameter_group_arn"></a> [db\_cluster\_parameter\_group\_arn](#output\_db\_cluster\_parameter\_group\_arn) | The ARN of the DB cluster parameter group created |

docs/UPGRADE-10.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ If you find a bug, please open an issue with supporting configuration to reprodu
55

66
## List of backwards incompatible changes
77

8-
- Terraform `v1.11` is now minimum supported version to support write-only (`wo_*`) attributes.
8+
- Terraform `v1.11.1` is now minimum supported version to support write-only (`wo_*`) attributes.
99
- AWS provider `v6.18` is now minimum supported version
1010
- The underlying `aws_security_group_rule` resources has been replaced with `aws_vpc_security_group_ingress_rule` and `aws_vpc_security_group_egress_rule` to allow for more flexibility in defining security group rules.
1111
- `master_password` is no longer supported and only the write-only equivalent is supported (`master_password_wo` and `master_password_wo_version`) ([#513](https://github.com/terraform-aws-modules/terraform-aws-rds-aurora/pull/513))
@@ -83,7 +83,7 @@ If you find a bug, please open an issue with supporting configuration to reprodu
8383

8484
4. Removed outputs:
8585

86-
- None
86+
- `cluster_master_password`
8787

8888
5. Renamed outputs:
8989

examples/autoscaling/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.11 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.18 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.11.1 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.26 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.18 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.26 |
3030

3131
## Modules
3232

@@ -64,6 +64,7 @@ No inputs.
6464
| <a name="output_cluster_reader_endpoint"></a> [cluster\_reader\_endpoint](#output\_cluster\_reader\_endpoint) | A read-only endpoint for the cluster, automatically load-balanced across replicas |
6565
| <a name="output_cluster_resource_id"></a> [cluster\_resource\_id](#output\_cluster\_resource\_id) | The RDS Cluster Resource ID |
6666
| <a name="output_cluster_role_associations"></a> [cluster\_role\_associations](#output\_cluster\_role\_associations) | A map of IAM roles associated with the cluster and their attributes |
67+
| <a name="output_cluster_upgrade_rollout_order"></a> [cluster\_upgrade\_rollout\_order](#output\_cluster\_upgrade\_rollout\_order) | Order in which the clusters are upgraded (first, second, last) |
6768
| <a name="output_db_cluster_cloudwatch_log_groups"></a> [db\_cluster\_cloudwatch\_log\_groups](#output\_db\_cluster\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
6869
| <a name="output_db_cluster_parameter_group_arn"></a> [db\_cluster\_parameter\_group\_arn](#output\_db\_cluster\_parameter\_group\_arn) | The ARN of the DB cluster parameter group created |
6970
| <a name="output_db_cluster_parameter_group_id"></a> [db\_cluster\_parameter\_group\_id](#output\_db\_cluster\_parameter\_group\_id) | The ID of the DB cluster parameter group created |

examples/autoscaling/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ output "cluster_hosted_zone_id" {
6666
value = module.aurora.cluster_hosted_zone_id
6767
}
6868

69+
output "cluster_upgrade_rollout_order" {
70+
description = "Order in which the clusters are upgraded (first, second, last)"
71+
value = module.aurora.cluster_upgrade_rollout_order
72+
}
73+
6974
################################################################################
7075
# Cluster Instance(s)
7176
################################################################################

examples/autoscaling/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.11"
2+
required_version = ">= 1.11.1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.18"
7+
version = ">= 6.26"
88
}
99
}
1010
}

examples/dsql/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.11 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.18 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.11.1 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.26 |
2424

2525
## Providers
2626

examples/dsql/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.11"
2+
required_version = ">= 1.11.1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.18"
7+
version = ">= 6.26"
88
}
99
}
1010
}

examples/global-cluster/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.11 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.18 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.11.1 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.26 |
2424
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.5 |
2525

2626
## Providers
2727

2828
| Name | Version |
2929
|------|---------|
30-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.18 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.26 |
3131
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.5 |
3232

3333
## Modules
@@ -77,6 +77,7 @@ No inputs.
7777
| <a name="output_primary_db_cluster_cloudwatch_log_groups"></a> [primary\_db\_cluster\_cloudwatch\_log\_groups](#output\_primary\_db\_cluster\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
7878
| <a name="output_primary_db_cluster_parameter_group_arn"></a> [primary\_db\_cluster\_parameter\_group\_arn](#output\_primary\_db\_cluster\_parameter\_group\_arn) | The ARN of the DB cluster parameter group created |
7979
| <a name="output_primary_db_cluster_parameter_group_id"></a> [primary\_db\_cluster\_parameter\_group\_id](#output\_primary\_db\_cluster\_parameter\_group\_id) | The ID of the DB cluster parameter group created |
80+
| <a name="output_primary_db_cluster_upgrade_rollout_order"></a> [primary\_db\_cluster\_upgrade\_rollout\_order](#output\_primary\_db\_cluster\_upgrade\_rollout\_order) | Order in which the clusters are upgraded (first, second, last) |
8081
| <a name="output_primary_db_parameter_group_arn"></a> [primary\_db\_parameter\_group\_arn](#output\_primary\_db\_parameter\_group\_arn) | The ARN of the DB parameter group created |
8182
| <a name="output_primary_db_parameter_group_id"></a> [primary\_db\_parameter\_group\_id](#output\_primary\_db\_parameter\_group\_id) | The ID of the DB parameter group created |
8283
| <a name="output_primary_db_subnet_group_name"></a> [primary\_db\_subnet\_group\_name](#output\_primary\_db\_subnet\_group\_name) | The db subnet group name |
@@ -101,6 +102,7 @@ No inputs.
101102
| <a name="output_secondary_db_cluster_cloudwatch_log_groups"></a> [secondary\_db\_cluster\_cloudwatch\_log\_groups](#output\_secondary\_db\_cluster\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
102103
| <a name="output_secondary_db_cluster_parameter_group_arn"></a> [secondary\_db\_cluster\_parameter\_group\_arn](#output\_secondary\_db\_cluster\_parameter\_group\_arn) | The ARN of the DB cluster parameter group created |
103104
| <a name="output_secondary_db_cluster_parameter_group_id"></a> [secondary\_db\_cluster\_parameter\_group\_id](#output\_secondary\_db\_cluster\_parameter\_group\_id) | The ID of the DB cluster parameter group created |
105+
| <a name="output_secondary_db_cluster_upgrade_rollout_order"></a> [secondary\_db\_cluster\_upgrade\_rollout\_order](#output\_secondary\_db\_cluster\_upgrade\_rollout\_order) | Order in which the clusters are upgraded (first, second, last) |
104106
| <a name="output_secondary_db_parameter_group_arn"></a> [secondary\_db\_parameter\_group\_arn](#output\_secondary\_db\_parameter\_group\_arn) | The ARN of the DB parameter group created |
105107
| <a name="output_secondary_db_parameter_group_id"></a> [secondary\_db\_parameter\_group\_id](#output\_secondary\_db\_parameter\_group\_id) | The ID of the DB parameter group created |
106108
| <a name="output_secondary_db_subnet_group_name"></a> [secondary\_db\_subnet\_group\_name](#output\_secondary\_db\_subnet\_group\_name) | The db subnet group name |

examples/global-cluster/outputs.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ output "primary_db_cluster_cloudwatch_log_groups" {
122122
value = module.aurora_primary.db_cluster_cloudwatch_log_groups
123123
}
124124

125+
output "primary_db_cluster_upgrade_rollout_order" {
126+
description = "Order in which the clusters are upgraded (first, second, last)"
127+
value = module.aurora_primary.cluster_upgrade_rollout_order
128+
}
129+
125130
################################################################################
126131
# RDS Aurora Module - Secondary
127132
################################################################################
@@ -245,3 +250,8 @@ output "secondary_db_cluster_cloudwatch_log_groups" {
245250
description = "Map of CloudWatch log groups created and their attributes"
246251
value = module.aurora_secondary.db_cluster_cloudwatch_log_groups
247252
}
253+
254+
output "secondary_db_cluster_upgrade_rollout_order" {
255+
description = "Order in which the clusters are upgraded (first, second, last)"
256+
value = module.aurora_secondary.cluster_upgrade_rollout_order
257+
}

examples/global-cluster/versions.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.11"
2+
required_version = ">= 1.11.1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 6.18"
7+
version = ">= 6.26"
88
}
99
random = {
1010
source = "hashicorp/random"

0 commit comments

Comments
 (0)