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: Change RDS variable iops default value from 0 to null #456

Conversation

etiennechabert
Copy link
Contributor

Description

The RDS variable iops is currently having a default of 0.
In this PR, I propose that the default value become null and so to avoid side effects on the AWS Provider side.

Motivation and Context

The current default value is causing side effects for people currently trying to adopt gp3 (see: hashicorp/terraform-provider-aws#28271)

Breaking Changes

No idea, could be, but I have the feeling not.

How Has This Been Tested?

Not tested yet, just proposing the idea

@etiennechabert etiennechabert changed the title Change RDS variable iops default value from 0 to null Fix: Change RDS variable iops default value from 0 to null Dec 14, 2022
@etiennechabert etiennechabert changed the title Fix: Change RDS variable iops default value from 0 to null fix: Change RDS variable iops default value from 0 to null Dec 14, 2022
@etiennechabert etiennechabert changed the title fix: Change RDS variable iops default value from 0 to null fix: change RDS variable iops default value from 0 to null Dec 14, 2022
@etiennechabert etiennechabert changed the title fix: change RDS variable iops default value from 0 to null fix: Change RDS variable iops default value from 0 to null Dec 14, 2022
@@ -180,7 +180,7 @@ variable "multi_az" {
variable "iops" {
description = "The amount of provisioned IOPS. Setting this implies a storage_type of 'io1'"
type = number
default = 0
default = null
Copy link
Contributor Author

@etiennechabert etiennechabert Dec 14, 2022

Choose a reason for hiding this comment

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

I honestly have no idea if there is a good reason or not for the default value currently been 0.

The only thing I know: this is currently causing an incompatibility with the default behavior of the AWS Provider in his version 4.46.0.

Someone, not using terraform-aws-rds module, can directly transition from gp2 to gp3 (see: hashicorp/terraform-provider-aws#28271 (comment))

But using terraform-aws-rds, you are forced to override the default value of iops from 0, to null:
hashicorp/terraform-provider-aws#28271 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

its optional so null should be the appropriate default value

@bryantbiggs
Copy link
Member

you'll need to run pre-commit run terraform_docs -a to update the docs accordingly

@etiennechabert
Copy link
Contributor Author

Thanks for the hint @bryantbiggs!

I was looking for it before attempting my manual modification. Hope it's good now 🤞

Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

thank you!

@bryantbiggs bryantbiggs merged commit 9c8d21f into terraform-aws-modules:master Dec 14, 2022
@etiennechabert
Copy link
Contributor Author

Thanks for your help putting it together 🤝

antonbabenko pushed a commit that referenced this pull request Dec 14, 2022
### [5.2.1](v5.2.0...v5.2.1) (2022-12-14)

### Bug Fixes

* Change RDS variable `iops` default value from `0` to `null` ([#456](#456)) ([9c8d21f](9c8d21f))
@etiennechabert etiennechabert deleted the change-rds-iops-value-to-null branch December 14, 2022 14:11
@antonbabenko
Copy link
Member

This PR is included in version 5.2.1 🎉

@lucasvuotto
Copy link

Hi! I don't know if this is the best place to comment this (please point me to the right one if it's the case), but this PR kinda misses one case: the change was only applied to db-instance submodule. If instead one is using the root module, the default for iops is still 0 instead of null, and this 0 gets propagated to db-instance.

@etiennechabert
Copy link
Contributor Author

Thanks for pointing this out @lucasvuotto, will replicate my recent changes in the main module, starting with:
#462

@github-actions
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 19, 2023
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.

4 participants