Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

implemented flattern for stack:tree and support for {Fn::GetAtt:[resource,attribute]} #37

Merged
merged 6 commits into from
Sep 1, 2016

Conversation

dng-dev
Copy link
Contributor

@dng-dev dng-dev commented Aug 27, 2016

Hey @fbrnc i added the flattern of the tree and also the possibility for inline {Fn::GetAtt:[resource,attribute]} which is an feature request by you #31
bildschirmfoto 2016-08-27 um 21 58 09

@dng-dev dng-dev changed the title implemented flattern to command stack:tree implemented flattern for stack:tree and support for {Fn::GetAtt:[resource,attribute]} Aug 27, 2016
@fbrnc
Copy link
Member

fbrnc commented Aug 29, 2016

You're awesome! Thanks for picking this up and implementing this so quickly. I'll test the tree later today, but here's already one thing I noticed about the Fn:GetAtt feature:

The regex you're using does not allow adding whitespace everywhere. E.g. EIP="{Fn::GetAtt:[NatIp,AllocationId] }" (notice the extra space before the last }) would not be a match.

While of course it's easy to fix that I'd like to suggest a simpler snytax that also matches the scheme of other inline functions and value lookups:

{Attribute:<resource>:<attribure>}
(your example then would be {Attribute:NatIp:AllocationId}

What do you think?

@dng-dev
Copy link
Contributor Author

dng-dev commented Aug 29, 2016

Hey @fbrnc i will fix the regex you are right. I don't think its an good idea to introduce a new syntax for the Fn::GetAtt part. I think it can produce more confusion. But the final decision is up to you.

@dng-dev
Copy link
Contributor Author

dng-dev commented Aug 29, 2016

Hey @fbrnc i updated the regex in the simulator. When you have time play around. If you don't see problems, i will update the regexp.

https://regex101.com/r/vN8qT9/2

@dng-dev
Copy link
Contributor Author

dng-dev commented Aug 29, 2016

Hey @fbrnc i updated the regexp

@fbrnc fbrnc merged commit bcadd8b into AOEpeople:master Sep 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants