Skip to content

Commit

Permalink
fix edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar242 committed Sep 26, 2023
1 parent 3d4b523 commit 3fa1d7a
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 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 3fa1d7a

Please sign in to comment.