-
Notifications
You must be signed in to change notification settings - Fork 9k
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 delete_automated_backups option for rds instances #8461
Conversation
Any ideas when and if this gets merged? Would be great to have. |
Hi @MrLunar 👋 Thanks for going ahead with this! I think this is the right approach, but we'll need to add a couple of things so it works smoothly. Item 1 is a state migration: https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#resource-contribution-guidelines
Item 2 is import support: https://github.com/terraform-providers/terraform-provider-aws/blob/master/.github/CONTRIBUTING.md#adding-resource-import-support Let us know if you're still available to work on this. I appreciate the start! |
@aeschright Thanks for taking a look at this PR. If the patch author doesn't have the time to take a look in the next few days, I'm more than happy to take those two things over. Will give it a few days before I dive in |
No problem, I will take a look at those (probably at the weekend) and get them added in. Cheers! @alex Thanks for the support! If I struggle to get this completed in a reasonable timeframe, I'll let you know. |
Awesome! We'd very much like to have this at |
5ba5b18
to
9e93f3b
Compare
to support new virtual attribute "delete_automated_backups"
|
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.
This looks great, thanks so much, @MrLunar 🚀
Output from acceptance testing:
--- PASS: TestAccAWSDBInstance_AllowMajorVersionUpgrade (504.57s)
--- PASS: TestAccAWSDBInstance_basic (559.89s)
--- PASS: TestAccAWSDBInstance_CACertificateIdentifier (690.35s)
--- PASS: TestAccAWSDBInstance_cloudwatchLogsExportConfiguration (527.87s)
--- PASS: TestAccAWSDBInstance_cloudwatchLogsExportConfigurationUpdate (778.72s)
--- PASS: TestAccAWSDBInstance_DeletionProtection (544.94s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Oracle (736.63s)
--- PASS: TestAccAWSDBInstance_EnabledCloudwatchLogsExports_Postgresql (584.79s)
--- PASS: TestAccAWSDBInstance_FinalSnapshotIdentifier (832.16s)
--- PASS: TestAccAWSDBInstance_FinalSnapshotIdentifier_SkipFinalSnapshot (771.31s)
--- PASS: TestAccAWSDBInstance_generatedName (589.19s)
--- PASS: TestAccAWSDBInstance_iamAuth (498.14s)
--- PASS: TestAccAWSDBInstance_IsAlreadyBeingDeleted (499.57s)
--- PASS: TestAccAWSDBInstance_kmsKey (495.75s)
--- PASS: TestAccAWSDBInstance_MaxAllocatedStorage (624.72s)
--- PASS: TestAccAWSDBInstance_MinorVersion (442.63s)
--- PASS: TestAccAWSDBInstance_MonitoringInterval (994.22s)
--- PASS: TestAccAWSDBInstance_MonitoringRoleArn_EnabledToDisabled (747.67s)
--- PASS: TestAccAWSDBInstance_MonitoringRoleArn_EnabledToRemoved (774.43s)
--- PASS: TestAccAWSDBInstance_MonitoringRoleArn_RemovedToEnabled (643.71s)
--- PASS: TestAccAWSDBInstance_MSSQL_Domain (3138.70s)
--- PASS: TestAccAWSDBInstance_MSSQL_DomainSnapshotRestore (3194.44s)
--- PASS: TestAccAWSDBInstance_MSSQL_TZ (1494.84s)
--- PASS: TestAccAWSDBInstance_MySQL_SnapshotRestoreWithEngineVersion (1970.10s)
--- PASS: TestAccAWSDBInstance_namePrefix (568.95s)
--- PASS: TestAccAWSDBInstance_NoDeleteAutomatedBackups (705.29s)
--- PASS: TestAccAWSDBInstance_optionGroup (518.53s)
--- PASS: TestAccAWSDBInstance_Password (582.04s)
--- PASS: TestAccAWSDBInstance_portUpdate (528.25s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb (1480.14s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AllowMajorVersionUpgrade (1753.52s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AutoMinorVersionUpgrade (1611.87s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_AvailabilityZone (1541.21s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_BackupRetentionPeriod (1793.14s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_BackupWindow (1526.01s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_CACertificateIdentifier (1475.11s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_IamDatabaseAuthenticationEnabled (1626.78s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_MaintenanceWindow (1414.19s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_MaxAllocatedStorage (1414.77s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_Monitoring (1793.90s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_MultiAZ (2234.03s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_ParameterGroupName (1646.73s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_PerformanceInsightsEnabled (1757.92s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_Port (1535.96s)
--- PASS: TestAccAWSDBInstance_ReplicateSourceDb_VpcSecurityGroupIds (1477.33s)
--- PASS: TestAccAWSDBInstance_separate_iops_update (781.13s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier (1201.52s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AllocatedStorage (1534.42s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AllowMajorVersionUpgrade (2485.20s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AutoMinorVersionUpgrade (1221.27s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_AvailabilityZone (1183.16s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod (1607.65s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupRetentionPeriod_Unset (1837.74s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_BackupWindow (1271.59s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_DeletionProtection (1297.40s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_IamDatabaseAuthenticationEnabled (1352.30s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Io1Storage (1625.67s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MaintenanceWindow (1151.10s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MaxAllocatedStorage (1242.04s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Monitoring (1424.87s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ (2043.46s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_MultiAZ_SQLServer (4215.52s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_ParameterGroupName (1403.09s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_PerformanceInsightsEnabled (1544.76s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Port (1321.98s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_Tags (1402.55s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds (1132.69s)
--- PASS: TestAccAWSDBInstance_SnapshotIdentifier_VpcSecurityGroupIds_Tags (1232.98s)
--- PASS: TestAccAWSDBInstance_subnetGroup (913.45s)
--- PASS: TestAccAWSRDSDBInstance_PerformanceInsightsEnabled_DisabledToEnabled (630.08s)
--- PASS: TestAccAWSRDSDBInstance_PerformanceInsightsEnabled_EnabledToDisabled (792.31s)
--- PASS: TestAccAWSRDSDBInstance_PerformanceInsightsKmsKeyId (1053.46s)
--- PASS: TestAccAWSRDSDBInstance_PerformanceInsightsRetentionPeriod (873.09s)
--- PASS: TestResourceAwsDbInstanceStateUpgradeV0 (0.00s)
--- SKIP: TestAccAWSDBInstance_ec2Classic (1.15s)
--- SKIP: TestAccAWSDBInstance_ReplicateSourceDb_DeletionProtection (0.00s)
--- SKIP: TestAccAWSDBInstance_SnapshotIdentifier_Tags_Unset (0.00s)
"github.com/hashicorp/terraform-plugin-sdk/helper/schema" | ||
) | ||
|
||
func resourceAwsDbInstanceResourceV0() *schema.Resource { |
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.
Verified all attributes/types match pre state upgrade schema. 👍
} | ||
} | ||
|
||
func TestResourceAwsDbInstanceStateUpgradeV0(t *testing.T) { |
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.
💯
}) | ||
} | ||
|
||
func testAccCheckAWSDBInstanceAutomatedBackups(s *terraform.State) error { |
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.
Nice! 😄
Thanks, @MrLunar! |
This has been released in version 2.49.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
Fixes #6507 and #6512
Changes proposed in this pull request:
Output from acceptance testing: