ionos-cloud / module-ansible

Apache License 2.0
10 stars 8 forks source link

Support check mode in user module #202

Closed jplitza closed 2 months ago

jplitza commented 3 months ago

Current SDK Version

7.4.1

Use-cases

Attempted Solutions

Proposal

Skip the actually API call that updates/creates the user when check mode is enabled. When it already existed, subsequent tasks might even succeed with the information that is returned.

References

genofire commented 3 months ago

Oh yea, a sandbox ionos api or so would be nice:

rmocanu-ionos commented 2 months ago

Hello, this should be available in the latest beta release, v7.5.0-beta.1, please let us if we should make any changes to the current implementation

jplitza commented 2 months ago

@rmocanu-ionos Thanks for the quick implementation! I love that you implemented diff mode along the way!

However, check mode doesn't return the object itself, even if some of the keys are known. When the user already exists, I would love the user key of the response to contain the fields the module expects to be set after its invocation (so basically what is used during the diff computation as after, plus the UUID identifier as id).

rmocanu-ionos commented 2 months ago

Hello, I have included the changes in the latest release, v7.5.0, please let us know if there are any other problems