cloudposse / terraform-aws-rds

Terraform module to provision AWS RDS instances
https://cloudposse.com/accelerate
Apache License 2.0
153 stars 180 forks source link

gp3 storage type also supports providing iops manually when storage is atleast 400gb. #168

Closed ankitjethi closed 5 months ago

ankitjethi commented 7 months ago

Describe the Bug

We created a RDS database with gp3 storage type and then after that on the next terraform apply, it is is changing the iops from 3000 to 0.

Expected Behavior

it should not change to 0. it should stay at 3000 for storage size under 400gb. And let us customize IOPS for greater that 400gb.

Steps to Reproduce

create a gp3 RDS with less than 400gb storage and then re-run terraform apply.

Screenshots

Screenshot 2024-01-25 at 7 32 24 PM

Environment

No response

Additional Context

No response

kbolino commented 5 months ago

Specifically, the issue here seems to be that the iops variable in this module has a default of 0 when it should have a default of null. Explicitly setting iops = null when calling the module fixes the issue.