From 6a8748f2854239712e6d182a6b8f10f6941ac477 Mon Sep 17 00:00:00 2001 From: Ivan Chekaldin Date: Mon, 30 Sep 2024 13:39:49 -0400 Subject: [PATCH 1/3] fix: Remove CurrentState attribute This is necessary because describe_domain_config method returns both CurrentState and DesiredState while update_domain_config method only expects DesiredState. --- plugins/module_utils/opensearch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/module_utils/opensearch.py b/plugins/module_utils/opensearch.py index 13d90bd6a78..6d9c296fec7 100644 --- a/plugins/module_utils/opensearch.py +++ b/plugins/module_utils/opensearch.py @@ -63,6 +63,10 @@ def get_domain_config(client, module, domain_name): for k in response["DomainConfig"]: if "Options" in response["DomainConfig"][k]: domain_config[k] = response["DomainConfig"][k]["Options"] + # describe_domain_config method returns both CurrentState and DesiredState + # while update_domain_config only expects DesiredState + if k == "AIMLOptions" and "CurrentState" in domain_config[k]: + del domain_config[k]["AIMLOptions"]["CurrentState"] domain_config["DomainName"] = domain_name # If ES cluster is attached to the Internet, the "VPCOptions" property is not present. if "VPCOptions" in domain_config: From 4eb37bcf691b9f1b4e93a9ae41e896ab1c8d5fe7 Mon Sep 17 00:00:00 2001 From: Ivan Chekaldin Date: Mon, 30 Sep 2024 13:44:52 -0400 Subject: [PATCH 2/3] Add changelog fragment --- .../2162-opensearch-remove-current-state-parameter-yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/2162-opensearch-remove-current-state-parameter-yml diff --git a/changelogs/fragments/2162-opensearch-remove-current-state-parameter-yml b/changelogs/fragments/2162-opensearch-remove-current-state-parameter-yml new file mode 100644 index 00000000000..218b23111ba --- /dev/null +++ b/changelogs/fragments/2162-opensearch-remove-current-state-parameter-yml @@ -0,0 +1,2 @@ +bugfixes: + - opensearch - Remove CurrentState parameter from the domain config (https://github.com/ansible-collections/community.aws/pull/2162). From 92d0d15f6fd0c0fdd3433459cf4c7104b49acf99 Mon Sep 17 00:00:00 2001 From: Ivan Chekaldin Date: Mon, 30 Sep 2024 13:52:53 -0400 Subject: [PATCH 3/3] fix: Changelog fragment file name --- ...ter-yml => 2162-opensearch-remove-current-state-parameter.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelogs/fragments/{2162-opensearch-remove-current-state-parameter-yml => 2162-opensearch-remove-current-state-parameter.yml} (100%) diff --git a/changelogs/fragments/2162-opensearch-remove-current-state-parameter-yml b/changelogs/fragments/2162-opensearch-remove-current-state-parameter.yml similarity index 100% rename from changelogs/fragments/2162-opensearch-remove-current-state-parameter-yml rename to changelogs/fragments/2162-opensearch-remove-current-state-parameter.yml