Skip to content

[RDS] - DBInstance drift when Autoscaling is enabled #2255

@pescador691

Description

@pescador691

What happened?

I am using crossplane to deploy a RDS instance in Aws with ArgoCD.

I have autoscale enabled but when the instance increases it's storage via autoscale, crossplane drifts it's state throwing the error

cannot update DBInstance in AWS: InvalidParameterCombination: Invalid storage size for engine name postgres and storage type gp3: 20 status code: 400, request id:

To solve the error, I need to update manually the allocatedStorage in my config file.

Delved a bit into the code and saw that this feature was implemented for RdsInstace but not for DBInstance

There was this PR that was closed and it is not implemented for the DBInstance.

Will this feature be implemented in the migration from RdsInstance to DBInstance?

How can we reproduce it?

I am using the following config:

apiVersion: rds.aws.crossplane.io/v1alpha1
kind: DBInstance
metadata:
  name: my-rds
spec:
  forProvider:
    applyImmediately: true
    allocatedStorage: 20
    maxAllocatedStorage: 100
    storageType: gp3
    autoMinorVersionUpgrade: true
    allowMajorVersionUpgrade: true
    engineVersion: "17.4"
    dbInstanceClass: db.t4g.small
    engine: postgres

Autoscale needs to be triggered in order to crossplane to see a different value in allocatedStorage and the real value in Aws.

What environment did it happen in?

Crossplane version: 1.19
Eks with k8s 1.32

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions