-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
resource/aws_db_instance: Add max_allocated_storage argument (support Storage Autoscaling) #9087
Conversation
… 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) ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from one comment/question LGTM👍
d.SetPartial("max_allocated_storage") | ||
mas := d.Get("max_allocated_storage").(int) | ||
|
||
if mas == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct way to disable mas is to set it to the current allocation? Wouldn’t that just set it to the current amount rather then disable ir🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah let me drop a comment in there! This is designed to cover both these scenarios for disabling autoscaling:
- Setting the
max_allocated_storage
value equal to theallocated_storage
value (the method documented in the AWS user guide) - Removing the
max_allocated_storage
configuration altogether (the0
check)
I think from an operator perspective the second scenario could be expected behavior and the API will return an error if you try to set it to 0
as its expecting the allocated storage value to disable autoscaling. 👍
…e update logic Reference: #9087 (comment)
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! |
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! |
Community Note
Closes #9076
Release note for CHANGELOG:
Output from acceptance testing (test failures present in master):