[s3_bucket] Cast tag keys and values to text to match the values returned (#46405)

* Cast tag keys and values to text to match the values returned

* changelog
This commit is contained in:
Sloane Hertel 2018-10-17 13:39:52 -04:00 committed by Ryan Brown
commit b808e1bc5c
2 changed files with 7 additions and 0 deletions

View file

@ -230,6 +230,8 @@ def create_or_update_bucket(s3_client, module, location):
module.fail_json_aws(e, msg="Failed to get bucket tags")
if tags is not None:
# Tags are always returned as text
tags = dict((to_text(k), to_text(v)) for k, v in tags.items())
if current_tags_dict != tags:
if tags:
try: