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

rds_instance: modify delete protection #922

Closed
1 task done
jbpratt opened this issue Feb 3, 2022 · 2 comments · Fixed by #1105
Closed
1 task done

rds_instance: modify delete protection #922

jbpratt opened this issue Feb 3, 2022 · 2 comments · Fixed by #1105
Labels
feature This issue/PR relates to a feature request has_pr module module needs_triage plugins plugin (any type)

Comments

@jbpratt
Copy link

jbpratt commented Feb 3, 2022

Summary

I am trying to modify an RDS instance that has delete protection on it, preventing deletion. I would like the ability to modify this via ansible directly

for rds in $(aws rds describe-db-instances | jq -r '.DBInstances.[].DBInstanceIdentifier'); do
  aws rds modify-db-instance --no-deletion-protection --db-instance-identifier "${rds}"
done

Issue Type

Feature Idea

Component Name

rds_instance

Additional Information

- name: Get all RDS instances
  community.aws.rds_instance_info:
    region: "{{ region }}"
    aws_access_key: "{{ aws_access_key_id }}"
    aws_secret_key: "{{ aws_secret_access_key }}"
  register: __rds_instances

- name: Remove delete protection from any DB instances
  community.aws.rds_instance:
    id: "{{ item.db_instance_identifier }}"
    deletion_protection: false
  loop: __rds_instances.instances

- name: Remove any DB instance without a final snapshot
  community.aws.rds_instance:
    id: "{{ item.db_instance_identifier }}"
    state: absent
    skip_final_snapshot: true
  loop: __rds_instances.instances

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@jatorcasso
Copy link
Contributor

Hi @jbpratt! Thanks for requesting this. I went ahead and opened a PR for this since I was already working on this module. In the future, feel free to open a PR yourself and ask any questions that you may have.

@ansibullbot
Copy link

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request has_pr module module needs_triage plugins plugin (any type) labels Apr 29, 2022
softwarefactory-project-zuul bot pushed a commit that referenced this issue May 9, 2022
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 <None>
Reviewed-by: Markus Bergholz <[email protected]>
patchback bot pushed a commit that referenced this issue May 9, 2022
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 <None>
Reviewed-by: Markus Bergholz <[email protected]>
(cherry picked from commit 77cb097)
softwarefactory-project-zuul bot pushed a commit that referenced this issue May 9, 2022
[PR #1105/77cb0974 backport][stable-3] rds_instance - add deletion_protection param

This is a backport of PR #1105 as merged into main (77cb097).
Depends-On: #1116
SUMMARY
Fixes #922
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
rds_instance

Reviewed-by: Alina Buzachis <None>
abikouo pushed a commit to abikouo/community.aws that referenced this issue Oct 24, 2023
rds_instance - add deletion_protection param

Depends-On: ansible-collections#1116
SUMMARY
Fixes ansible-collections#922
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
rds_instance

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Markus Bergholz <[email protected]>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections@77cb097
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request has_pr module module needs_triage plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants