-
Notifications
You must be signed in to change notification settings - Fork 15
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
Adds BackupRetentionPeriod to RDS spec #50
Adds BackupRetentionPeriod to RDS spec #50
Conversation
willdavsmith
commented
Nov 20, 2023
•
edited
Loading
edited
- Adds BackupRetentionPeriod to AWS RDS recipe
aws/sqldatabases.bicep
Outdated
@@ -50,6 +50,9 @@ param allocatedStorage string = '20' | |||
@description('Database license model') | |||
param licenseModel string = 'license-included' | |||
|
|||
@description('The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Defaults to 0.') | |||
param backupRetentionPeriod int = 0 |
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.
The default of 0 means indefinite.
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.
AWS CloudFormation spec says 0 should mean disabled backups: https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/registry/activated-extensions/details/schema?arn=arn%3Aaws%3Acloudformation%3Aus-west-2%3A%3Atype%2Fresource%2FAWS-RDS-DBInstance
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.
Should we also add the upper and lower limits to the description?
aws/sqldatabases.bicep
Outdated
@description('The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Defaults to 0.') | ||
param backupRetentionPeriod int = 0 |
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.
Can we set the default to 1 (same as what RDS sets https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html), and override it to zero for our eshop scenario?
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.
@willdavsmith is there something blocking this PR?
Signed-off-by: willdavsmith <[email protected]>
Signed-off-by: willdavsmith <[email protected]>
Signed-off-by: willdavsmith <[email protected]>
cdacc30
to
67216f4
Compare
@@ -50,6 +50,9 @@ param allocatedStorage string = '20' | |||
@description('Database license model') | |||
param licenseModel string = 'license-included' | |||
|
|||
@description('The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Defaults to 1.') |
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.
Could you include this in the description as well #50 (comment)?
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 checked the spec for this resource and it doesn't look like there's a maximum - I think the link yetkin linked is the C# SDK
"BackupRetentionPeriod": {
"type": "integer",
"minimum": 0,
"default": 1,
"description": "The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups."
},
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.
https://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html - this describes max as 35.
Constraints:
Must be a value from 0 to 35.
Can't be set to 0 if the DB instance is a source to read replicas.
Can't be set to 0 for an RDS Custom for Oracle DB instance.
Signed-off-by: willdavsmith <[email protected]>