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 e22aa2578a8..9d17aa9ef49 100644 --- a/plugins/modules/s3_object.py +++ b/plugins/modules/s3_object.py @@ -1481,11 +1481,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",