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

feat!: allow null values for backup_window and retention_period #184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

morremeyer
Copy link

@morremeyer morremeyer commented Nov 6, 2023

what

Sets the default for backup_window and retention_period to null.

BREAKING CHANGE: backup_window and retention_period are now null by default. If you want to keep the old
default configuration, set backup_window = "07:00-09:00" and retention_period = 5.

why

When AWS backup is used, the settings either have to match the AWS backup settings exactly or they
have to be unset.

Trying to apply any diverging settings will result in an error:

InvalidParameterValue: RDS cluster $name is associated with the following AwsBackupRecoveryPointArn: arn:aws:backup:$region:$account:recovery-point:$mode:cluster-$id. The BackupRetentionPeriod can be blank, or you can use the current value, $current_value. For more details, see the AWS Backup documentation

Since matching these settings manually defeats the purpose of having a single source of truth,
this change updates the default values to be null.

I would prefer to make this a non-breaking change, but without adding another variable, this seems to not be possible
since a default can't be overridden with null.

references

This is possible since hashicorp/terraform-provider-aws#33465 was merged for aws_rds_cluster resources.

@morremeyer
Copy link
Author

@srhopkins @dotCipher Can you share an estimate for when you'll get to review this PR? That would be very useful for my planning. Thank you!

@hans-d
Copy link

hans-d commented Feb 27, 2024

/terratest

@morremeyer
Copy link
Author

@hans-d Thanks! I see the error is

Error: creating EC2 VPC: operation error EC2: CreateVpc, https response error StatusCode: 400, RequestID: 9f342b56-35a2-405b-b548-b2f29f700952, api error VpcLimitExceeded: The maximum number of VPCs has been reached.

Which I can do nothing about. Does anyone need to be notified about the need for cleanup here?

@hans-d
Copy link

hans-d commented Feb 28, 2024

@hans-d Thanks! I see the error is

Error: creating EC2 VPC: operation error EC2: CreateVpc, https response error StatusCode: 400, RequestID: 9f342b56-35a2-405b-b548-b2f29f700952, api error VpcLimitExceeded: The maximum number of VPCs has been reached.

Which I can do nothing about. Does anyone need to be notified about the need for cleanup here?

I'm already following up on this one - something I cannot fix myself as well unfortunately.

Copy link

mergify bot commented Mar 9, 2024

Thanks @morremeyer for creating this pull request!

A maintainer will review your changes shortly. Please don't be discouraged if it takes a while.

While you wait, make sure to review our contributor guidelines.

Tip

Need help or want to ask for a PR review to be expedited?

Join us on Slack in the #pr-reviews channel.

@mergify mergify bot added the triage Needs triage label Mar 15, 2024
This sets the default for backup_window and retention_period to `null`.

When AWS backup is used, the settings either have to match the AWS backup settings exactly or they
have to be unset.

Trying to apply any diverging settings will result in an error:

```
InvalidParameterValue: RDS cluster $name is associated with the following AwsBackupRecoveryPointArn: arn:aws:backup:$region:$account:recovery-point:$mode:cluster-$id. The BackupRetentionPeriod can be blank, or you can use the current value, $current_value. For more details, see the AWS Backup documentation
```

Since matching these settings manually defeats the purpose of having a single source of truth,
this change updates the default values to be `null`.

I would prefer to make this a non-breaking change, but without adding another variable, this seems to not be possible
since a default can't be overridden with `null`.

BREAKING CHANGE: backup_window and retention_period are now `null` by default. If you want to keep the old
default configuration, set `backup_window = "07:00-09:00"` and `retention_period = 5`.
@morremeyer
Copy link
Author

/terratest

@Nuru Nuru added the do not merge Do not merge this PR, doing so would cause problems label Jun 6, 2024
@Nuru
Copy link
Sponsor Contributor

Nuru commented Jun 6, 2024

Sorry it took so long, @morremeyer

I'm inclined to not accept the PR because

  • It is a breaking change
  • Your statement "a default can't be overridden with null" is incorrect

I generally disapprove of breaking changes that have easy non-breaking workarounds, and this one fits that category.

@morremeyer
Copy link
Author

@Nuru I agree with that, I always prefer non-breaking changes to breaking ones. However, when I implemented this, I did not see a way to make a non-breaking change.

Let me re-examine how I came to this conclusion so that I can document it better - or ideally find out I was wrong!

@Nuru Nuru added invalid This doesn't seem right and removed triage Needs triage labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Do not merge this PR, doing so would cause problems invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants