[Bug]: Updating aws_redshiftserverless_workgroup base and max capacities failures #36030
Labels
bug
Addresses a defect in current functionality.
service/redshiftserverless
Issues and PRs that pertain to the redshiftserverless service.
Milestone
Terraform Core Version
1.7.4
AWS Provider Version
5.38.0
Affected Resource(s)
aws_redshiftserverless_workgroup
Expected Behavior
Updating base_capacity and max_capacity should succeed no matter what current and new values are as long those are within acceptable limits.
Actual Behavior
Since Amazon Redshift Serverless API only allows for updating Workgroups one attribute at a time, the ordering of updates of base_capacity and max_capacity on aws_redshiftserverless_workgroup matters. Currently, provider updates attributes in alphabetical order so base_capacity is update first and then max_capacity.
So, if for example current base_capacity is 128 and max_capacity is 256, and new update is attempted for base_capacity to 512 and max_capacity to 1024, the first update to base_capacity will fail as it's larger value than current max_capacity of 256. In this case, max_capacity should be updated first to 1024 and only after base_capacity to 512.
When lowering the values for base_capacity and max_capacity, the reverse order is often required to first lower base_capacity and only after lower max_capacity.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Update the base_capacity to 512 and max_capacity to 1024 and apply. It will fail.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: