Open hakenmt opened 1 month ago
Sounds related to JSII but I am wondering what you are trying to do with aws-eks construct?
The automatically created Lambda functions get created in nested stacks. For my use case, I can't use the automatically defined CDK bucket, the bucket name is provided as a parameter to the main stack at runtime. So I do this in my synthesizer:
Synthesizer = new DefaultStackSynthesizer(new DefaultStackSynthesizerProps() {
FileAssetsBucketName = "${AssetsBucket}",
BucketPrefix = "${AssetsBucketPrefix}",
Qualifier = null,
GenerateBootstrapVersionRule = false
})
Then, the asset s3 code path is set to use this variable when synth is run. In stacks/nested stacks I control, I can pass the received value of the parent stack parameter to those nested stacks (add CfnParameter
objects to the nested stack and also specify parameters
in the nested stack resource props). For the nested stacks created by the EKS construct I cannot. Trying to manipulate the nested stack resource through node tree isn't successful since I can't actually cast the nested stack resource to something that I can manipulate to add the parameters
property.
Describe the bug
I have use case that I need to add parameters being provided to a nested stack that is created by an AWS provided EKS construct (in this case the nested stacks containing the Kubectl and resource provider lambda functions). I can find the resources in the node tree, but they cannot be casted to a
CfnStack
, they are of typeAmazon.JSII.Runtime.Deputy.AnonymousObject
and I cannot access theparameters
property of the stack. This results in having to manipulate the rendered CloudFormation template to achieve the desired outcome.Expected Behavior
Be able to access a nested stack resource and cast it to a
CfnStack
.Current Behavior
The only available type is
Amazon.JSII.Runtime.Deputy.AnonymousObject
.Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.138.0
Framework Version
No response
Node.js Version
v20.9.0
OS
darwin
Language
.NET
Language Version
No response
Other information
No response