From 1c4277d2888a80e007c1813107212f2fc97fad15 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Wed, 15 Nov 2023 06:39:05 +0000 Subject: [PATCH] s3_object: fix value typo from last to latest (#1847) (#1852) [PR #1847/84351137 backport][stable-7] s3_object: fix value typo from last to latest This is a backport of PR #1847 as merged into main (8435113). SUMMARY Fixes #1777 Fixing value for overwrite to not produce deprecation warning on setting overwirte=latest. ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_object ADDITIONAL INFORMATION Reviewed-by: Mark Chappell --- .../1847-s3_object-fix-false-deprecation-warning.yml | 3 +++ plugins/modules/s3_object.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/1847-s3_object-fix-false-deprecation-warning.yml diff --git a/changelogs/fragments/1847-s3_object-fix-false-deprecation-warning.yml b/changelogs/fragments/1847-s3_object-fix-false-deprecation-warning.yml new file mode 100644 index 00000000000..f00b5026d16 --- /dev/null +++ b/changelogs/fragments/1847-s3_object-fix-false-deprecation-warning.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - s3_object - Fix typo that caused false deprecation warning when setting `overwrite=latest` (https://github.com/ansible-collections/amazon.aws/pull/1847). diff --git a/plugins/modules/s3_object.py b/plugins/modules/s3_object.py index 8b710f3c1c0..8dd8275ffd7 100644 --- a/plugins/modules/s3_object.py +++ b/plugins/modules/s3_object.py @@ -1535,11 +1535,11 @@ def main(): if "amazonaws.com" not in endpoint_url: module.fail_json(msg="dualstack only applies to AWS S3") - if module.params.get("overwrite") not in ("always", "never", "different", "last"): + if module.params.get("overwrite") not in ("always", "never", "different", "latest"): module.deprecate( ( "Support for passing values of 'overwrite' other than 'always', 'never', " - "'different' or 'last', has been deprecated." + "'different' or 'latest', has been deprecated." ), date="2024-12-01", collection_name="amazon.aws",