-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cannot pass Dynamic path to a nested application using !Sub or !Ref intrinsic functions #3144
Comments
I don't quite follow some of the explanation - can you perhaps give me a minimal set of reproducing steps for this? |
Thanks for responding @awood45 Code level example: parent-stack.yaml
So the above code example works perfectly fine because it is a static path in the template.yaml file itself. But what I am trying to achieve is I take a command line argument and make the Location Property for DatabaseStack dynamic. For e.g.
This gives me an error that the ApplicationId is required, Where as a static path was working correctly I hope this gives more clarity |
This seems to be a case where the language extensions capability should help - can you try it? Described here: #2533 |
I think one challenge with this though is that you're using a If you were referring to uploaded SAR applications this would make more sense, but this isn't really what What I'd recommend instead is different templates for each environment, or having your embedded application accept a parameter and do the appropriate configuration. Let me know if that helps - otherwise I can add this as a feature request discussion. |
In fact, this seems to cover the same ground as aws/aws-sam-cli#4767 |
I'm going to close this and recommend adding a plus-one to the linked issue if you want to use this pattern. The failure is before we get to any SAM Transform steps, so you'd be making a feature request for SAM CLI to process some intrinsic functions directly. If you're actually using deployed SAR applications in some way and see this issue, feel free to reopen. |
parent-application.yaml
And consider we have child1-application.yaml and child2-application.yaml in the resource directory so a static location path
resource/child1-application.yaml
works fine but!Sub resource/${Env}-applicaion.yaml
does not work where Env is a command-line argument that is passed child1. It gives an error that the applicationId is missing, but the same error does not occur when I use staticresources/child1-application.yaml
The text was updated successfully, but these errors were encountered: