-
Notifications
You must be signed in to change notification settings - Fork 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
(s3-deployment): cross stack values do not work with Source.data/jsonData #19257
Comments
Hey @johnameyer, Thanks for reporting this. I have verified the behavior, this certainly seems like a problem. If you come up with a fix and would like to implement it yourself (fastest approach), please @ myself or otaviomacedo (who reviewed the last similar PR) to get a quicker review. |
It looks like this is related to #18882 |
I'm experiencing the exact same issue. I even tried using |
I'm hitting exactly the same issue. Please could someone from AWS take a look urgently? |
Although not a fix, I managed to work around it by creating an SSM parameter using the cross account references and use the value (stringValue) of the parameter in the data/jsonData. |
Thanks @AKoetsier. I've temporarily re-written as a single stack to avoid the cross-stack references. This works fine at the moment so is worth bearing in mind as another option for anyone else coming to this issue. |
thanks for the hint @AKoetsier, I hit this today and worked around it pretty quickly with an ssm parameter |
Running into this exact issue |
Any update here? I'm happy to contribute a fix if someone more familiar could assist in root causing why these references aren't being picked up |
From what I can see, the library just doesn't consider cross stack references at all. Only values within the same stack can be (easily) resolved. |
Did a bit of a deep dive here, I am not sure how to fix it, but I figured out why When {
"Fn::ImportValue": "[otherstack]:ExportsOutputRef[resource id]"
} When {"Ref":"[resource id]"} |
I know this is the original issue, but I'm closing it in favor of the newer one submitted here set to be closed by a PR. Thanks for the discussion! Feel free to continue on the newer issue |
What is the problem?
Source.data/jsonData resolves values from within a stack successfully but creates references to out-of stack values in the template as if they were in the same stack.
Reproduction Steps
What did you expect to happen?
Successful deployment and inclusion of resolved value in deployed file by way of generating cross stack imports/exports as would usually result.
What actually happened?
CDK CLI Version
2.14.0
Framework Version
2.14.0
Node.js Version
v14.19.0
OS
WSL
Language
Typescript
Language Version
Typescript (~4.5.5)
Other information
Ref to previous comment/original issue: #12903 (comment)
The text was updated successfully, but these errors were encountered: