pulumi / pulumi-aws-native

AWS Native Provider for Pulumi
Apache License 2.0
90 stars 17 forks source link

Error You can't specify IOPS or storage throughput for engine postgres and a storage size less than 400 when changing to GP3 on RDS with aws-native #968

Open cmich3625 opened 1 year ago

cmich3625 commented 1 year ago

What happened?

When changing our RDS instances to use GP3 it updates fine the first time, subsequent pulumi ups give us this error You can't specify IOPS or storage throughput for engine postgres and a storage size less than 400.

Setting Iops and StorageThroughput to nil do not work I believe the default value for iops is 0 and need to be nil

Expected Behavior

Pulumi up RDS with aws-native/rds package and have a successful run

Steps to reproduce

Update RDS to gp3 pulumi up Change anything and try to pulumi up it will fail to update RDS with error: You can't specify IOPS or storage throughput for engine postgres and a storage size less than 400.

Output of pulumi about

pulumi about pp=pulumi CLI Version 3.72.2 Go Version go1.20.5 Go Compiler gc

Plugins NAME VERSION aws 5.18.0 aws-native 0.67.0 go unknown kubernetes 3.25.0 random 4.10.0 tls 4.8.0

Host OS debian Version bookworm/sid Arch x86_64

This project is written in go: executable='/usr/local/go/bin/go' version='go version go1.20 linux/amd64'

Found no pending operations associated with geosite-development

Backend Name pop-os Organizations

Dependencies: NAME VERSION github.com/pulumi/pulumi-aws/sdk/v5 5.18.0 github.com/pulumi/pulumi/sdk/v3 3.63.0 github.com/pulumi/pulumi-tls/sdk/v4 4.8.0 github.com/pulumi/pulumi/pkg/v3 3.63.0 github.com/stretchr/testify 1.8.2 github.com/pulumi/pulumi-aws-native/sdk 0.67.0 github.com/pulumi/pulumi-kubernetes/sdk/v3 3.25.0 github.com/pulumi/pulumi-random/sdk/v4 4.10.0 gopkg.in/yaml.v3 3.0.1

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

aq17 commented 1 year ago

Hi @cmich3625 , thanks for opening this issue. Looks like this is a known error when using an AWS GP3 RDS instance and you are correct – the workaround should be that iops must be set to nil, since the default will be 0 which is invalid if the allocatedStorage is below the threshold. Please let us know if this solves the issue.

cmich3625 commented 1 year ago

Setting Iops and StorageThroughput to nil does not resolve the issue, we still are seeing the error, You can't specify IOPS or storage throughput for engine postgres and a storage size less than 400. We have both set them to null with a var and like below with no luck under the DBInstanceArgs Iops: nil, StorageThroughput: nil,