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

aws-s3-bucket-deployment: lazy values do not work with Source #32767

Open
1 task
agdimech opened this issue Jan 7, 2025 · 1 comment
Open
1 task

aws-s3-bucket-deployment: lazy values do not work with Source #32767

agdimech opened this issue Jan 7, 2025 · 1 comment
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3 package/tools Related to AWS CDK Tools or CLI

Comments

@agdimech
Copy link

agdimech commented Jan 7, 2025

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

@agdimech agdimech added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 7, 2025
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jan 7, 2025
@pahud
Copy link
Contributor

pahud commented Jan 7, 2025

Thank you. Can you share your use cases and why you need this feature?

@pahud pahud added feature-request A feature should be added or improved. p3 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

2 participants