3 ms·
CloudFormation Custom Resources can help with this. You can make a Lambda Function that can call the raw API, and have a CloudFormation resource call that for
by nzoschke 11y ago
CloudFormation Custom Resources can help with this.
You can make a Lambda Function that can call the raw API, and have a CloudFormation resource call that for create, update and delete.
It's a really powerful strategy for extending what CloudFormation can do.
- Rapzid 11y agoYeah, certainly could but.. Treating AWS resources as "custom" resources to hack around their long complained about CloudFormation turnaround? Ugh.. Then I have to reason about how to extract that custom resource out and replace it with the RightWay™ once it's added, which may just not even be possible... If it came to that I would rather throw in my efforts with the Terraform community(which I want to do anyway) who have already added this functionality it seems https://github.com/hashicorp/terraform/pull/4381 https://github.com/hashicorp/terraform/pull/4381 .
- nzoschke 11y agoTerraform is an awesome user space tool. I've been using the CF custom resource to manage a ton of stuff (hundreds of clusters and thousands of apps) and it's excellent. It's amazing that the service supports custom anything, and the create, update delete pattern is perfect. Replacing a custom resource with the right resource can be challenging. My strategy is to not do it. Create all new stacks the new way and have good tools to migrate parameters and data from an old stack to a new stack.