Skip to content

Commit

Permalink
Remove erroneous Tags assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
shahruk authored and shadycuz committed Nov 10, 2024
1 parent 997cee5 commit 11e0d79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/cf2tf/conversion/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def tag_conversion(_tc: "TemplateConverter", params: CFParams) -> CFParams:
original_tags: ListType = params["Tags"] # type: ignore
# Handle Cloudformation templates that generate Tags: []
if not original_tags:
params["tags"] = params["Tags"]
del params["Tags"]
return params

Expand Down
5 changes: 2 additions & 3 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ def test_perform_global_overrides():

assert result is empty_params
assert "Tags" not in result
assert "tags" in result
assert isinstance(result["tags"], list)
assert [] == result["tags"]
assert "tags" not in result
assert {} == result

params = {"Tags": [{"Key": "foo", "Value": "bar"}]}
result = convert.perform_global_overrides("aws_s3_bucket", params, template)
Expand Down

0 comments on commit 11e0d79

Please sign in to comment.