ionos-cloud / module-ansible

Apache License 2.0
10 stars 8 forks source link

Creation of S3Key in 6.1.3 throws error #89

Closed aimee-889 closed 2 years ago

aimee-889 commented 2 years ago

Description

When I try to run the s3key module with the version 6.1.3 I get an error.

Expected behavior

Environment

Ansible version:

ansible 2.10.7

Module version:

ionoscloudsdk.ionoscloud version: 6.1.3 

OS:

ubuntu 20.04

Configuration Files

- name: Create an s3key for IONOS DCD
  ionoscloudsdk.ionoscloud.s3key:
      user_id: "******"

How to Reproduce

Error and Debug Output

The full traceback is:
  File "/tmp/ansible_ionoscloudsdk.ionoscloud.s3key_payload_mimbk4pt/ansible_ionoscloudsdk.ionoscloud.s3key_payload.zip/ansible_collections/ionoscloudsdk/ionoscloud/plugins/modules/s3key.py", line 369, in main
  File "/tmp/ansible_ionoscloudsdk.ionoscloud.s3key_payload_mimbk4pt/ansible_ionoscloudsdk.ionoscloud.s3key_payload.zip/ansible_collections/ionoscloudsdk/ionoscloud/plugins/modules/s3key.py", line 172, in create_s3key
fatal: [infra-dev-schulcloud-1]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "active": null,
            "api_url": null,
            "idempotency": false,
            "key_id": null,
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "state": "present",
            "token": null,
            "user_id": "******",
            "username": "****",
            "wait": true,
            "wait_timeout": 600
        }
    }
}

MSG:

failed to set S3 Key state present: module 'ionoscloud' has no attribute 'UserS3KeysApi'

Additional Notes

works in 5.0.2 and 5.0.11

References

mimihalescu commented 2 years ago

Hello! Thank you for reaching out!

Can you, please, check my comment from this issue: #62? It should fix the problem.

If not, please add an additional comment here and we'll look into it.

Thanks, Mihaela

aimee-889 commented 2 years ago

Thank you so much and sorry for asking an already answered question!

mimihalescu commented 2 years ago

No worries, I'm glad that the issue is fixed.

Have a nice day! :)