-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Consider making Construct stack-aware #798
Copy link
Copy link
Closed
Labels
@aws-cdk/coreRelated to core CDK functionalityRelated to core CDK functionalityeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.
Metadata
Metadata
Assignees
Labels
@aws-cdk/coreRelated to core CDK functionalityRelated to core CDK functionalityeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.
Type
Fields
Give feedbackNo fields configured for issues without a type.
We are starting to realize that the fact the
Constructis not stack-aware hinders our ability to provide a good experience. For example, to get a handle to the stack, users need to writeStack.find(this)instead of something likethis.stack. Similarly, if I want to find a resource, I can usethis.findChildbut have to cast it down tocdk.Resource. Would have been handy to havethis.findResource, etc.A possible simple solution to this is to convert the base
ConstructtoBaseConstructand then define a new classConstructwhich will beStackandResourceaware and will have the desired APIs.Brought up by @ccurrie-amzn in a discussion over #784