From a3ff7cabbce01f3219340fdeb240a14f7d828d61 Mon Sep 17 00:00:00 2001 From: Radu Mocanu Date: Thu, 21 Dec 2023 16:01:52 +0200 Subject: [PATCH] fix: retrieve registry after wait --- docs/api/container-registry/registry.md | 10 ++++++---- plugins/modules/registry.py | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/api/container-registry/registry.md b/docs/api/container-registry/registry.md index 312fbcb7..9cb36ecb 100644 --- a/docs/api/container-registry/registry.md +++ b/docs/api/container-registry/registry.md @@ -129,7 +129,8 @@ This is a module that supports creating, updating or destroying Registries features
dict False - Optional registry features. Format: 'vulnerability_scanning' key having a dict for value containing the 'enabled' key with a boolean value Note: These are all enabled by default, some may incur additional charges - see individual feature descriptions for details. Vulnerability scanning for images. Note: this is a paid add-on + Optional registry features. Format: 'vulnerability_scanning' key having a dict for value containing the 'enabled' key with a boolean value + Note: Vulnerability scanning for images is enabled by default. This is a paid add-on, please make sure you specify if you do not want it enabled name
str @@ -139,7 +140,7 @@ This is a module that supports creating, updating or destroying Registries allow_replace
bool False - Boolean indincating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead
Default: False + Boolean indicating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead
Default: False api_url
str @@ -287,7 +288,8 @@ This is a module that supports creating, updating or destroying Registries features
dict False - Optional registry features. Format: 'vulnerability_scanning' key having a dict for value containing the 'enabled' key with a boolean value Note: These are all enabled by default, some may incur additional charges - see individual feature descriptions for details. Vulnerability scanning for images. Note: this is a paid add-on + Optional registry features. Format: 'vulnerability_scanning' key having a dict for value containing the 'enabled' key with a boolean value + Note: Vulnerability scanning for images is enabled by default. This is a paid add-on, please make sure you specify if you do not want it enabled name
str @@ -302,7 +304,7 @@ This is a module that supports creating, updating or destroying Registries allow_replace
bool False - Boolean indincating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead
Default: False + Boolean indicating if the resource should be recreated when the state cannot be reached in another way. This may be used to prevent resources from being deleted from specifying a different value to an immutable property. An error will be thrown instead
Default: False api_url
str diff --git a/plugins/modules/registry.py b/plugins/modules/registry.py index f73cf7a7..5cd94b33 100644 --- a/plugins/modules/registry.py +++ b/plugins/modules/registry.py @@ -44,7 +44,7 @@ 'type': 'str', }, 'features': { - 'description': ["Optional registry features. Format: 'vulnerability_scanning' key having a dict for value containing the 'enabled' key with a boolean value Note: These are all enabled by default, some may incur additional charges - see individual feature descriptions for details. Vulnerability scanning for images. Note: this is a paid add-on"], + 'description': ["Optional registry features. Format: 'vulnerability_scanning' key having a dict for value containing the 'enabled' key with a boolean value\n Note: Vulnerability scanning for images is enabled by default. This is a paid add-on, please make sure you specify if you do not want it enabled"], 'available': ['present', 'update'], 'type': 'dict', }, @@ -62,7 +62,7 @@ }, 'allow_replace': { 'description': [ - 'Boolean indincating if the resource should be recreated when the state cannot be reached in ' + 'Boolean indicating if the resource should be recreated when the state cannot be reached in ' 'another way. This may be used to prevent resources from being deleted from specifying a different ' 'value to an immutable property. An error will be thrown instead', ], @@ -317,6 +317,7 @@ def _create_object(module, client, existing_object=None): scaleup=10000, timeout=wait_timeout, ) + registry = registries_api.registries_find_by_id(registry.id) except ionoscloud_container_registry.ApiException as e: module.fail_json(msg="failed to create the new Registry: %s" % to_native(e)) return registry @@ -360,6 +361,7 @@ def _update_object(module, client, existing_object): scaleup=10000, timeout=wait_timeout, ) + registry = registries_api.registries_find_by_id(existing_object.id) return registry except ionoscloud_container_registry.ApiException as e: