-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
@aws-cdk/aws-s3-deployment: broken cross stack reference when used in Source.jsonData #22843
Comments
You're right @smnrd, I can reproduce this. Thanks for the easily copy+pastable code! Looking at the template, it's because it's trying to directly reference another resource as if it's in the same template. In other words, it's not making use of parameters which are how we handle cross-stack references.
I believe the cause of this is due to this line of code where it makes the
|
Hey! I wanted to check on this issue. I see the PR may be stalled out a bit. While waiting on that to resolve, is there a workaround that can be used? I attempted to use Fn.importValue and similar constructs, but wasn't having too much luck. Thanks! |
@cdanhowell see #19257 (comment) for a workaround. |
Multiple issues have been closed related to this issue, all of which reference this issue and to use the workaround. Is the root cause going to be addressed? this seems like a pretty common use case for |
I observed the same issue when adding source to BucketDeployment using the |
It looks like this is still an issue and I was wondering if there's any updates regarding a fix? |
Describe the bug
I'm trying to use
S3Deployment
with aSource.jsonData
source to deploy a json configuration file with values resolved at deploy time (eg cognito userpool id). These values, properties of a construct from another nested stack passed as StackProp to the S3Deployment nested stack, doesn't get resolved properly.Expected Behavior
When I use values from another stack construct in a
Source.jsonData
source withS3Deployment
, they are properly resolved at deploy time.Current Behavior
A 'unresolved resource dependencies' error is thrown.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
1.180.0
Framework Version
No response
Node.js Version
14.19.0
OS
Debian GNU/Linux 10 (buster)
Language
Typescript
Language Version
4.4.2
Other information
No response
The text was updated successfully, but these errors were encountered: