From 1b2a8427e986f33d909e08aa1c49ad115ec29538 Mon Sep 17 00:00:00 2001 From: Joseph Torcasso <87090265+jatorcasso@users.noreply.github.com> Date: Mon, 9 May 2022 10:41:16 -0400 Subject: [PATCH] rds_instance - add deletion_protection param (#1105) rds_instance - add deletion_protection param Depends-On: #1116 SUMMARY Fixes #922 ISSUE TYPE Feature Pull Request COMPONENT NAME rds_instance Reviewed-by: Alina Buzachis Reviewed-by: Markus Bergholz This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/77cb09740beb34940ba678495a0d60768bce2d70 --- plugins/modules/rds_instance.py | 14 ++++++++++++++ plugins/modules/rds_instance_info.py | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/plugins/modules/rds_instance.py b/plugins/modules/rds_instance.py index 4ae96546a0c..09cb6c06979 100644 --- a/plugins/modules/rds_instance.py +++ b/plugins/modules/rds_instance.py @@ -160,6 +160,13 @@ aliases: - subnet_group type: str + deletion_protection: + description: + - A value that indicates whether the DB instance has deletion protection enabled. + The database can't be deleted when deletion protection is enabled. + By default, deletion protection is disabled. + type: bool + version_added: 3.3.0 domain: description: - The Active Directory Domain to restore the instance in. @@ -666,6 +673,12 @@ returned: always type: str sample: db-UHV3QRNWX4KB6GALCIGRML6QFA +deletion_protection: + description: C(True) if the DB instance has deletion protection enabled, C(False) if not. + returned: always + type: bool + sample: False + version_added: 3.3.0 domain_memberships: description: The Active Directory Domain membership records associated with the DB instance. returned: always @@ -1256,6 +1269,7 @@ def main(): db_security_groups=dict(type='list', elements='str'), db_snapshot_identifier=dict(), db_subnet_group_name=dict(aliases=['subnet_group']), + deletion_protection=dict(type='bool'), domain=dict(), domain_iam_role_name=dict(), enable_cloudwatch_logs_exports=dict(type='list', aliases=['cloudwatch_log_exports'], elements='str'), diff --git a/plugins/modules/rds_instance_info.py b/plugins/modules/rds_instance_info.py index 22a10a081ed..6e41ea62940 100644 --- a/plugins/modules/rds_instance_info.py +++ b/plugins/modules/rds_instance_info.py @@ -188,6 +188,12 @@ returned: always type: str sample: db-AAAAAAAAAAAAAAAAAAAAAAAAAA + deletion_protection: + description: C(True) if the DB instance has deletion protection enabled, C(False) if not. + returned: always + type: bool + sample: False + version_added: 3.3.0 domain_memberships: description: List of domain memberships returned: always