ansible-collections / ansible-collections/google.cloud
gcp_secret_manager: support delete all the versions but `latest`
- Dominant language
- Python
- Stars
- 105
- Forks
- 144
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 4
Description
##### SUMMARY
Support `exclude_latest` when using `gcp_secret_manager` with `version: all-but-latest`
```yaml
- name: Delete all versions of a secret
google.cloud.gcp_secret_manager:
name: secret_key
version: all-but-latest
state: absent
```
##### ISSUE TYPE
- Feature Idea
##### COMPONENT NAME
`google.cloud.gcp_secret_manager`
##### ADDITIONAL INFORMATION
https://github.com/ansible-collections/google.cloud/issues/543 added support for `gcp_secret_manager`.
This should help remove old versions without the need to pay for them:
- https://cloud.google.com/secret-manager/pricing
```yaml
```
Contributor guide
Research direction
Start at the google.cloud.gcp_secret_manager module and trace the existing handling for version: all and version: latest. Implement the requested all-but-latest deletion behavior for state: absent, preserving the latest version, and verify that the example playbook produces the intended result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, google-cloud, python
- Domain
- cloud, devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100