From 2f463649219ee2c6b7a489a4bd0cb65684815752 Mon Sep 17 00:00:00 2001 From: Flyte Date: Wed, 1 Jul 2015 09:32:58 +0100 Subject: [PATCH] Provide correct kwargs to rds2 connection when making a final snapshot --- lib/ansible/modules/cloud/amazon/rds.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/rds.py b/lib/ansible/modules/cloud/amazon/rds.py index 7dc1955c558..cae3a43c54f 100755 --- a/lib/ansible/modules/cloud/amazon/rds.py +++ b/lib/ansible/modules/cloud/amazon/rds.py @@ -715,7 +715,10 @@ def delete_db_instance_or_snapshot(module, conn): if instance_name: if snapshot: params["skip_final_snapshot"] = False - params["final_snapshot_id"] = snapshot + if has_rds2: + params["final_db_snapshot_identifier"] = snapshot + else: + params["final_snapshot_id"] = snapshot else: params["skip_final_snapshot"] = True result = conn.delete_db_instance(instance_name, **params)