Open
Description
Describe the bug
When using a Lazy value for any of the Source inputs, they are getting resolved immediately due to bind happening in construction. i.e:
Source.jsonData(
DEFAULT_RUNTIME_CONFIG_FILENAME,
Lazy.any({provide => someValue})
)
We should be able to support synthesis time values here also by delaying the source binding until synthesis time.
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
Lazy values should work when passing them in as Sources to the BucketDeployment
Current Behavior
They are evaluated immediately.
Reproduction Steps
Source.jsonData(
'myfile.json,
Lazy.any(produce: () => {console.log('getting called before synth'); return {deferred: 'value'}})
)
Possible Solution
We should be able to support synthesis time values here also by delaying the source binding until synthesis time.
Additional Information/Context
No response
CDK CLI Version
latest
Framework Version
No response
Node.js Version
18
OS
osx
Language
TypeScript
Language Version
No response
Other information
No response