scaleway / ansible

Ansible Collection for Scaleway
https://galaxy.ansible.com/scaleway/scaleway
GNU General Public License v3.0
8 stars 5 forks source link

Stop using deprecated get_secret_by_name & support secret path #15

Open alexsegura opened 11 months ago

alexsegura commented 11 months ago

This method/API endpoint is deprecated.

GetSecretByName usage is now deprecated. Scaleway recommends that you use the ListSecrets request with the name filter.

I guess it would mean changing:

secret = api.get_secret_by_name(secret_name=name, region=region)

To:

secret = api.list_secrets(name=name, region=region)

Also, the scaleway_secret_version module should support the path argument, so that we can retrieve a secret with the same name, and a different path.