terraform-aws-modules / terraform-aws-rds-aurora

Terraform module to create AWS RDS Aurora resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/rds-aurora/aws
Apache License 2.0
382 stars 551 forks source link

fix: Default retention to null #411

Closed reza-solaris closed 6 months ago

reza-solaris commented 8 months ago

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?

bryantbiggs commented 8 months ago

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

github-actions[bot] commented 7 months ago

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 commented 6 months ago

This issue has been resolved in version 9.0.0 :tada:

github-actions[bot] commented 5 months ago

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.