3 ms·
CDK maintains the state with AWS itself, Pulumi operates their own state service (with option of self management). I have never used CDK, but I've heard that it
by satya71 6y ago
CDK maintains the state with AWS itself, Pulumi operates their own state service (with option of self management). I have never used CDK, but I've heard that it's hard to recover from state corruption in CDK.
- jen20 6y agoWhile this is true, the reason is not called out: CDK simply generates a CloudFormation Template, and thus uses CloudFormation for state management, rather than using the cloud APIs directly.
- bogomipz 6y agoPerhaps I'm misunderstanding your point but doesn't Cloudformation use the cloud APIs directly? I'm curious why the extra level of indirection is important.
- debaserab2 6y agoCloudFormation does quite a bit of work to manage and calculate state differences. It's not CDK itself managing it (to my knowledge). This is noteworthy because many times CDK's constraints match CloudFormation's constraints. I've noticed a few issues in the CDK github repo that a feature is incomplete because they are waiting for a change or feature to land in CloudFormation first.
- watermelon0 6y agoIME this is one of the best features of CDK, coming from someone who uses both Terraform and Cloudformation for development/production. I never have to worry about losing the state or ending with the incomplete state, and no matter what, I can always just delete the whole CF stack (in rare cases, you might have to retry deletion, but it never loses resources.)
- jen20 6y agoI just saw (5 mins ago) a CloudFormation stack lose resources - it happens all the time if one is not careful to prevent all modification outside of the tool (the same as other infrastructure provisioning tools). DELETE_FAILED is not a fun state to be in, nor is it one that can easily be reasoned about. That said, I don’t think that “generates CloudFormation JSON” is a bad attribute of CDK, but it is a major difference between Pulumi and CDK. In particular it means arbitrary values cannot be used for control flow at run time with CDK, since the template has a static generation step. However, it also does not require an additional tool at runtime, which has value in some cases.