-
-
Notifications
You must be signed in to change notification settings - Fork 602
fix: Don't use a specific default value for preferred maintenance/backup windows for clusters #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: Don't use a specific default value for preferred maintenance/backup windows for clusters #524
Conversation
| description = "The daily time range during which automated backups are created if automated backups are enabled using the `backup_retention_period` parameter. Time in UTC" | ||
| description = "The daily time range (in UTC) during which automated backups are taken. Example: '09:46-10:16'. Must not overlap with `preferred_maintenance_window`" | ||
| type = string | ||
| default = "02:00-03:00" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can consider adopting this at the next breaking change
however, your commit/PR description is incorrect. we do not "hardcode" anything here - we have set a default value because a "sane" default value was not available at the time when this was originally set. users are free to set preferred_backup_window = null to achieve the desired effect today without any code changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this would be considered a breaking change because the default behavior is changing for newly created resources? I can update the description.
On the second part you just mean that it's a misuse of the word "hardcoded" since it's a configuration that you can override?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this would be considered a breaking change because the default behavior is changing for newly created resources? I can update the description.
Not just for new resources, its a change in default behavior of new or existing resources
On the second part you just mean that it's a misuse of the word "hardcoded" since it's a configuration that you can override?
Hardcoded means its codified in such a way that users cannot change the value. Currently this is specified through a variable with a default value - very standard for Terraform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not just for new resources, its a change in default behavior of new or existing resources
This won't affect existing resources unless they're destroyed and re-created as far as I know. Is that what you mean? Or perhaps I'm missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested it to know for certain what happens if the value changes from some provided string value to null. either way, its a change in the default behavior and that is breaking.
Description
This aligns the behavior with the instance level module. When not set, new resources will use service provided (regional) default window(s).
https://github.com/terraform-aws-modules/terraform-aws-rds/blob/master/modules/db_instance/variables.tf#L308
Motivation and Context
The main motivation is just to align the instance level and aurora level modules. Secondary to that it seems beneficial for these not to be set by default because the service provided defaults are regional and generally fall outside of business hours whereas these defaults may land in less convenient times in some regions.
Breaking Changes
Setting the default to null means terraform will use the provided values for any existing resources where it wasn't specified. So it won't break management of existing resources.
For new resources the behavior will change to use the service provided default which might be considered a breaking change.
How Has This Been Tested?
The plan for a new example resource on the old code looks like this:
With the proposed code both resources (cluster and instance) show:
After applying both resources show: