Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RDS Storage auto scaling #9076

Closed
edhgoose opened this issue Jun 21, 2019 · 10 comments · Fixed by #9087
Closed

Add support for RDS Storage auto scaling #9076

edhgoose opened this issue Jun 21, 2019 · 10 comments · Fixed by #9087
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service.
Milestone

Comments

@edhgoose
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

AWS have announced auto scaling of storage for some RDS instance types.

https://aws.amazon.com/about-aws/whats-new/2019/06/rds-storage-auto-scaling/

New or Affected Resource(s)

  • aws_rds

Potential Terraform Configuration

References

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling

@edhgoose edhgoose added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 21, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 21, 2019
@ewbankkit
Copy link
Contributor

@mwarkentin
Copy link
Contributor

I'm curious how this will look like on plans if the AWS storage has diverged from your initial defined storage for the RDS instance?

@bflad bflad added service/rds Issues and PRs that pertain to the rds service. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 21, 2019
@bflad
Copy link
Contributor

bflad commented Jun 21, 2019

@mwarkentin presumably Terraform will show a difference for the argument unless ignore_changes is used, e.g.

resource "aws_db_instance" "example" {
  allocated_storage = 123

  # ... other configuration ...

  # Prevent RDS storage auto scaling from recreating the resource
  lifecycle {
    ignore_changes = ["allocated_storage"]
  }
}

When this feature is implemented, we will likely want to add this to the resource documentation.

@bflad
Copy link
Contributor

bflad commented Jun 21, 2019

Speaking of implementation, I don't mind picking this one up right now since no one has yet. 😄

@bflad bflad self-assigned this Jun 21, 2019
@bflad
Copy link
Contributor

bflad commented Jun 21, 2019

It looks like this will be a new max_allocated_storage argument, where storage autoscaling is enabled if it is configured:

resource "aws_db_instance" "example" {
  allocated_storage     = 100
  max_allocated_storage = 200

  # ... other configuration ...
}

Given this implementation, we might be able to ignore the allocated_storage argument differences automatically within the resource if max_allocated_storage is defined.

@mwarkentin
Copy link
Contributor

Ah nice, I think that makes sense.

bflad added a commit that referenced this issue Jun 22, 2019
… Storage Autoscaling)

Reference: #9076

Output from acceptance testing (test failures present in master):

```
--- FAIL: TestAccAWSDBInstance_optionGroup (9.60s)
--- PASS: TestAccAWSDBInstance_IsAlreadyBeingDeleted (407.82s)
--- PASS: TestAccAWSDBInstance_kmsKey (447.28s)
--- PASS: TestAccAWSDBInstance_iamAuth (468.51s)
--- PASS: TestAccAWSDBInstance_basic (469.82s)
--- PASS: TestAccAWSDBInstance_generatedName (509.47s)
--- PASS: TestAccAWSDBInstance_namePrefix (509.57s)
--- PASS: TestAccAWSDBInstance_DeletionProtection (534.93s)
--- PASS: TestAccAWSDBInstance_MaxAllocatedStorage (554.00s)
--- PASS: TestAccAWSDBInstance_FinalSnapshotIdentifier_SkipFinalSnapshot (640.05s)
--- FAIL: TestAccAWSDBInstance_ReplicateSourceDb_AutoMinorVersionUpgrade (839.74s)
--- PASS: TestAccAWSDBInstance_subnetGroup (864.75s)
--- PASS: TestAccAWSDBInstance_FinalSnapshotIdentifier (975.11s)
--- FAIL: TestAccAWSDBInstance_S3Import (661.46s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_BackupWindow (1464.99s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_MaxAllocatedStorage (1520.22s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AvailabilityZone (1536.83s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_IamDatabaseAuthenticationEnabled (1586.30s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_MaintenanceWindow (1635.73s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb (1697.74s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier (1263.54s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_VpcSecurityGroupIds (1349.56s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_BackupRetentionPeriod (1940.63s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AllocatedStorage (1949.99s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_Port (1519.48s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AllocatedStorage (1475.69s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage (1389.89s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_Monitoring (1623.10s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AutoMinorVersionUpgrade (1233.00s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AvailabilityZone (1245.29s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_ParameterGroupName (1661.06s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod (1285.34s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_MultiAZ (2146.49s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_IamDatabaseAuthenticationEnabled (1083.14s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_DeletionProtection (1149.70s)
--- PASS: TestAccAWSDBInstance_portUpdate (570.32s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupWindow (1234.86s)
--- PASS: TestAccAWSDBInstance_enhancedMonitoring (670.62s)
--- PASS: TestAccAWSDBInstance_separate_iops_update (632.53s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MaintenanceWindow (1335.83s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Monitoring (1225.51s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MaxAllocatedStorage (1295.29s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod_Unset (1799.33s)
--- PASS: TestAccAWSDBInstance_MinorVersion (343.49s)
--- PASS: TestAccAWSDBInstance_ec2Classic (395.42s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Port (1173.81s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds_Tags (1094.16s)
--- PASS: TestAccAWSDBInstance_diffSuppressInitialState (443.64s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Tags (1223.46s)
--- PASS: TestAccAWSDBInstance_cloudwatchLogsExportConfiguration (511.70s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_ParameterGroupName (1284.52s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds (1196.15s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Postgresql (495.06s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ (1638.76s)
--- PASS: TestAccAWSDBInstance_cloudwatchLogsExportConfigurationUpdate (759.27s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Oracle (686.93s)
--- PASS: TestAccAWSDBInstance_MSSQL_TZ (1926.59s)
--- PASS: TestAccAWSDBInstance_MySQL_SnapshotRestoreWithEngineVersion (1864.61s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_PerformanceInsightsEnabled (1527.89s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_PerformanceInsightsEnabled (1632.72s)
--- PASS: TestAccAWSDBInstance_MSSQL_Domain (3296.64s)
--- PASS: TestAccAWSDBInstance_MSSQL_DomainSnapshotRestore (3228.09s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ_SQLServer (4095.19s)
```
@bflad
Copy link
Contributor

bflad commented Jun 22, 2019

Pull request submitted: #9087

@bflad bflad added this to the v2.17.0 milestone Jun 27, 2019
@bflad
Copy link
Contributor

bflad commented Jun 27, 2019

Support for the new max_allocated_storage argument has been merged and will release with version 2.17.0 of the Terraform AWS Provider, likely later today. 👍

@bflad
Copy link
Contributor

bflad commented Jun 28, 2019

This has been released in version 2.17.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Nov 3, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/rds Issues and PRs that pertain to the rds service.
Projects
None yet
4 participants