Cloudformation-coverage-roadmap: AWS::RDS::DBInstance (add Storage Auto Scaling)

Created on 1 Aug 2019  路  12Comments  路  Source: aws-cloudformation/cloudformation-coverage-roadmap

Title -> Amazon RDS now supports Storage Auto Scaling, it would be useful for many customers to have support for this feature within CloudFormation
Scope of request -> Add abilty to enable storage auto scaling on creating new RDS resources.
Expected behavior -> See relevant documentation:
Test case recommendation (optional) ->
Links to existing API doc (optional) -> https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling
Category tag (optional) -> Databases
Any additional context (optional) -> https://aws.amazon.com/about-aws/whats-new/2019/06/rds-storage-auto-scaling/

database

All 12 comments

+1

Any news about this feature?
+1

going to try to get an update this week - stay tuned

Release notes say it is already done - Dec 20 Added support for MaxAllocatedStorage property.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html.

Release notes say it is already done - Dec 20 Added support for MaxAllocatedStorage property.
docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html.

Someone gave it a try ?

Once the value MaxAllocatedStorage is set : the function Enable storage autoscaling is activated

This doesn't seem to work yet. Setting MaxAllocatedStorage to 1024 doesn't create a DB with auto scaling enabled for me using postgres.

The cloudformation spec looks like this:

  DB:
    DependsOn:
      - DBSecurityGroup
      - DBPassword
      - DBSubnetGroup
    Type: AWS::RDS::DBInstance
    Properties:
      DBSecurityGroups:
        - Ref: DBSecurityGroup
      DBInstanceClass: db.t2.micro
      DBSubnetGroupName: !Ref DBSubnetGroup
      AllocatedStorage: "10"
      MaxAllocatedStorage: 1024
      Engine: postgres
      MasterUsername: root
      MasterUserPassword: !GetAtt DBPassword.Secret
      SourceRegion: !Ref "AWS::Region"
      StorageEncrypted: true
    DeletionPolicy: Snapshot

Dandandan : Try with StorageType set to gp2

gp2 should already be the default according to the docs here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html

"Default: io1 if the Iops parameter is specified, otherwise gp2". The database also is shown as SSD-backed, so it should be like that.

Tried, setting it to "StorageType:gp2" explicitly, but that doesn't seem to change anything.

This feature 100% works on GP2 volumes:

Cloudformation parameters:

Allowed initial volume size

InitalVolumeSize:
    Description: Initial database volume size 
    Type: String
    Default: 20
    AllowedValues:
    - 20

Volume max volume size

MaxVolumeSize:
    Description: Database maximum volume size
    Type: String
    Default: 40
    AllowedValues:
    - 40
    - 60

RDS:
Type: AWS::RDS::DBInstance
# With this set to delete no snapshots will be taken on delete of the RDS instance - to keep change to "Retain"
DeletionPolicy: 'Delete'

  Properties: 
    StorageType: 'gp2'
    AllocatedStorage: !Ref InitalVolumeSize
    MaxAllocatedStorage: !Ref MaxVolumeSize

The last solution doesn't work for us even when StorageType is set to gp2. Is the DeletionPolicy: Retain needed to make this work? Cloudformation does accept the settings but the RDS configuration still shows Storage autoscaling: Disabled.

Is there any other way to enforce it using CloudFormation?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hoegertn picture hoegertn  路  4Comments

rjpereira picture rjpereira  路  4Comments

kdgregory picture kdgregory  路  3Comments

san-san picture san-san  路  3Comments

mildebrandt picture mildebrandt  路  3Comments