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

fix: Default retention to null #411

Closed

Conversation

reza-solaris
Copy link

Description

The default retention should not be set if the user is sending null. For example, if the backup policy is managed via the AWS Backup Organization policy all the retentions will be managed via the backup policy and setting the retention policy at the instance/cluster level would cause an error mentioned below:


│ Error: updating RDS Cluster (mydb-aurora-postgresql): InvalidParameterValue: RDS cluster mydb-aurora-postgresql is associated with the following AwsBackupRecoveryPointArn: arn:aws:backup:eu-central-1:123412341234:recovery-point:continuous:cluster-xxxxxxx. The BackupRetentionPeriod can be blank, or you can use the current value,15. For more details, see the AWS Backup documentation.

│ status code: 400, request id: 0050d544-de9e-4afd-abda-4e4287ef9a4b │
│ with module.mydb[0].module.aurora_database[0].module.rds_aurora.aws_rds_cluster.this[0],
│ on .terraform/modules/mydb.aurora_database.rds_aurora/main.tf line 59, in resource "aws_rds_cluster" "this":
│ 59: resource "aws_rds_cluster" "this" {

Motivation and Context

This change would allow the users to omit any value for the retention period to allow AWS Backup attached policy to manage the cluster backup retention period.

Breaking Changes

This will be breaking change if the user was using the module without providing any backup retention period and was relying on the given default.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

The default retention should not be set if the user is sending null.
For example, if the backup policy is managed via the AWS Backup Organization policy all the retentions will be managed via the backup policy and setting the retention policy at the instance/cluster level would cause an error mentioned below:


╷
│ Error: updating RDS Cluster (mydb-aurora-postgresql): InvalidParameterValue: RDS cluster mydb-aurora-postgresql is associated with the following AwsBackupRecoveryPointArn: arn:aws:backup:eu-central-1:123412341234:recovery-point:continuous:cluster-xxxxxxx. The BackupRetentionPeriod can be blank, or you can use the current value,15. For more details, see the AWS Backup documentation.

│ 	status code: 400, request id: 0050d544-de9e-4afd-abda-4e4287ef9a4b
│ 
│   with module.mydb[0].module.aurora_database[0].module.rds_aurora.aws_rds_cluster.this[0],
│   on .terraform/modules/mydb.aurora_database.rds_aurora/main.tf line 59, in resource "aws_rds_cluster" "this":
│   59: resource "aws_rds_cluster" "this" {
│
updating the readme default value for retention period
@reza-solaris reza-solaris changed the title Default retention to null fix: Default retention to null Oct 31, 2023
@bryantbiggs
Copy link
Member

this is a breaking change so we will put it on hold until the next breaking change

Copy link

github-actions bot commented Dec 1, 2023

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@antonbabenko
Copy link
Member

This issue has been resolved in version 9.0.0 🎉

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants