diff --git a/plugins/modules/application_credential.py b/plugins/modules/application_credential.py index 5b623c0d..57386de1 100644 --- a/plugins/modules/application_credential.py +++ b/plugins/modules/application_credential.py @@ -298,7 +298,11 @@ class IdentityApplicationCredentialModule(OpenStackModule): return creds def _get_cloud_config(self, creds): - cloud_region = openstack.config.OpenStackConfig().get_one(self.cloud) + if isinstance(self.cloud, str): + cloud_region = openstack.config.OpenStackConfig().get_one(self.cloud) + # If the cloud parameter is not a string, try to send it to kwargs + else: + cloud_region = openstack.config.OpenStackConfig().get_one(**self.cloud) conf = cloud_region.config cloud_config = copy.deepcopy(conf)