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

References in FnSub are not replace as part of inlining a component #77

Open
aaronwalker opened this issue Nov 15, 2018 · 2 comments
Open

Comments

@aaronwalker
Copy link
Member

No description provided.

@aaronwalker aaronwalker changed the title References in FnSub are not replace as part of inlining a template References in FnSub are not replace as part of inlining a component Nov 15, 2018
@toshke
Copy link
Member

toshke commented Jan 4, 2019

Started some work on this on https://github.com/toshke/cfhighlander/tree/issue-77
Idea is to add 'regex node replacement' to CFN flattening class, and replace any occurrences of
${Resource} or ${Resource.Property} on tree leaves (primitive values in YAML) with
${RenamedResource} and ${RenamedResource.Property} respectively.

@toshke
Copy link
Member

toshke commented Jan 4, 2019

Analysing further it looks like there are limitations to inlining and usage of Fn::Sub (below)

Case1:
Component output defined as simple !Ref Resource.Property
Before:

Value: !FnSub '${SubStack.Outputs.OutputName}'

After

Value: !FnSub '${ResourceFromSubstack.Property}'

Case2:

OutputDefined As Complex structure, e.g
!If [Condition, ResourceA, ResourceB]
Before:

Value: !FnSub '${SubStack.Outputs.OutputName}-Bla'

After

Not Available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants