Skip to content
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

Merged

Conversation

willdavsmith
Copy link
Contributor

@willdavsmith willdavsmith commented Nov 20, 2023

  • Adds BackupRetentionPeriod to AWS RDS recipe

@@ -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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 53 to 54
@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
Copy link
Contributor

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?

Copy link
Contributor

@kachawla kachawla left a 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?

@@ -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.')
Copy link
Contributor

@kachawla kachawla Dec 14, 2023

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)?

Copy link
Contributor Author

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."
    },

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

Copy link
Contributor

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]>
@willdavsmith willdavsmith merged commit 735cd58 into radius-project:main Jan 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants