custom-resources: make the CustomResource
depend on the AwsCustomResource
that created it
#28049
Open
2 tasks done
Labels
@aws-cdk/custom-resources
Related to AWS CDK Custom Resources
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
It's currently not possible to make the
CustomResource
created by anAwsCustomResource
depend on other resources. As a result, code that would otherwise appear to be correct to fail due to dependency issues.Use Case
To an end user, the following code looks correct, but causes an error:
This causes the following error:
Proposed Solution
Adding the following to
AwsCustomResource
fixes the issue:I have a fork created that implements this change: https://github.com/toxygene/aws-cdk
Other Information
It should be noted that there is a work around for this issue by creating the ManagedPolicy first, then pass that managed policy to the Role constructor. I found this work around frustrating because the
AwsCustomResource
was dictating how I created resources instead of me dictating it.Acknowledgements
CDK version used
2.110.0
Environment details (OS name and version, etc.)
macOS Ventura 13.6.1
The text was updated successfully, but these errors were encountered: