Reputation: 609
I want to use a custom resource to perform "post-deployment"-like modifications upon deploying a template.
Since it is a big template and I want to be able to create most of the resources in parallel, I would like to avoid adding DependsOn everywhere.
Is there a way to make sure that the last thing the deployment does is call the function of that lambda-backed custom resource?
Upvotes: 1
Views: 559
Reputation: 54
The solution can be adding all the resources in nested template and keep custom resource in parent CFT which can be called after nested stack is created successfully. So, your parent CFT which contain 2 resources,
In this case just one DependsOn is needed not multiple.
I hope you find this approach interesting.
Upvotes: 1