-
Notifications
You must be signed in to change notification settings - Fork 246
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
Golang CDK: synth fails when using lazy string due to circular reference #4486
Comments
Reproducible.
|
I hit this bug with python and found a workaround. Taking the example from the CDK Guide:
Maybe this can be of some use with Go as well? |
Also an issue in Java:
produces:
Switching to uncachedString works fine: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Lazy.html#static-uncachedwbrstringproducer-options But this seems to be discouraged by the docs. |
Describe the bug
This is probably specific to the Go CDK bindings, or it is also possible I am misunderstanding the use of the lazy string mechanism. When I try to use the
awscdk.Lazy_String
method for e.g. a log group name, synth fails due to a circular reference:See below for a very simple example that reproduces the issue.
Expected Behavior
Able to use the
awscdk.Lazy_String
function.Current Behavior
Synth fails when using the
awscdk.Lazy_String
function.Reproduction Steps
Complete example:
Then just run cdk synth, and it will fail.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.137.0 (build bb90b4c)
Framework Version
No response
Node.js Version
18.18.2
OS
Linux
Language
Go
Language Version
go version go1.20.12 linux/amd64
Other information
No response
The text was updated successfully, but these errors were encountered: