ansible-collections / amazon.cloud

Ansible Collection for Amazon AWS' Cloud Control API
GNU General Public License v3.0
12 stars 11 forks source link

MemoryDB support #58

Open goneri opened 1 year ago

goneri commented 1 year ago

Summary

I'm acutally working on the MemoryDB and the purpose of this issue is to have a place to keep track of the process.

Issue Type

Feature Idea

Component Name

Additional Information

No response

Code of Conduct

goneri commented 1 year ago

Issue found:

  1. snake_dict_to_camel_dict() doesn't properly rename the acl_name key: we get AclName when the API expects ACLName. Workaround:

    if "AclName" in params_to_set:
        params_to_set["ACLName"] = params_to_set.pop("AclName")
  2. wait=true fails with botocore.exceptions.WaiterError: Waiter resource_request_success failed: Max attempts exceeded

    wait_until_resource_request_success\nKeyError: 'StatusMessage'\n",
    diff --git a/plugins/module_utils/core.py b/plugins/module_utils/core.py
    index 2cb4e7b..e9894f5 100644
    --- a/plugins/module_utils/core.py
    +++ b/plugins/module_utils/core.py
    @@ -105,8 +105,10 @@ class CloudControlResource(object):
                     WaiterConfig=self._waiter_config,
                 )
             except botocore.exceptions.WaiterError as e:
    +            progress_event = e.last_response["ProgressEvent"]
    +            message = progress_event.get("StatusMessage") or progress_event.get("OperationStatus")
                 self.module.fail_json_aws(
    -                e.last_response["ProgressEvent"]["StatusMessage"],
    +                message,
                     msg="Resource request failed to reach successful state",
                 )
             except (