Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed yaml parsing error for !GetAtt #2332

Merged
merged 1 commit into from
Jan 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion awscli/customizations/cloudformation/yamlhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def intrinsics_multi_constructor(loader, tag_prefix, node):
# ShortHand notation for !GetAtt accepts Resource.Attribute format
# while the standard notation is to use an array
# [Resource, Attribute]. Convert shorthand to standard format
value = node.value.split(".")
value = node.value.split(".", 1)

elif isinstance(node, ScalarNode):
# Value of this node is scalar
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/customizations/cloudformation/test_yamlhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class TestYaml(unittest.TestCase):
Key2: !GetAtt Another.Arn
Key3: !FooBar [!Baz YetAnother, "hello"]
Key4: !SomeTag {"a": "1"}
Key5: !GetAtt OneMore.Outputs.Arn
"""

parsed_yaml_dict = {
Expand All @@ -47,6 +48,9 @@ class TestYaml(unittest.TestCase):
"Fn::SomeTag": {
"a": "1"
}
},
"Key5": {
"Fn::GetAtt": ["OneMore", "Outputs.Arn"]
}
}
}
Expand Down