Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar242 committed Sep 26, 2023
1 parent 3fa1d7a commit 7844a8f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/modules/rds_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1333,17 +1333,17 @@ def main():
else:
changed |= ensure_present(cluster, parameters, method_name, method_options_name)

if cluster and module.params.get("remove_from_global_db"):
if cluster["Engine"] in ["aurora", "aurora-mysql", "aurora-postgresql"]:
if changed:
wait_for_cluster_status(client, module, cluster_id, "cluster_available")
changed |= handle_remove_from_global_db(module, cluster)

if not module.check_mode and module.params["new_db_cluster_identifier"] and module.params["apply_immediately"]:
cluster_id = module.params["new_db_cluster_identifier"]
else:
cluster_id = module.params["db_cluster_identifier"]

if cluster_id and get_cluster(cluster_id) and module.params.get("remove_from_global_db"):
if cluster["Engine"] in ["aurora", "aurora-mysql", "aurora-postgresql"]:
if changed:
wait_for_cluster_status(client, module, cluster_id, "cluster_available")
changed |= handle_remove_from_global_db(module, cluster)

result = camel_dict_to_snake_dict(get_cluster(cluster_id))

if result:
Expand Down

0 comments on commit 7844a8f

Please sign in to comment.