Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opensearch - Remove CurrentState attribute #2162

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- opensearch - Remove CurrentState parameter from the domain config (https://github.com/ansible-collections/community.aws/pull/2162).
4 changes: 4 additions & 0 deletions plugins/module_utils/opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading