2

Pretty new to CDK/Cloudformation, just moving from Terraform, and was wondering if CDK/Cloudformation have something similar to Terraform's remote state? Or some other way that different team members could work on updating the same AWS resources without need to destroy/recreate everything.

Yuriy Galanter
  • 38,833
  • 15
  • 69
  • 136

1 Answers1

2

CDK is just a "wrapper" around CloudFormation, which means that AWS stores the state and manages your resources deployed using CDK.

Terraform does not use CloudFormation, thus it has to keep its own state. Also Terraform is cloud agnostic, so it manages state without needing to rely on any cloud resources, such as CloudFormation.

So no, CDK does not have its own state in the same sense as Terraform has.

Marcin
  • 215,873
  • 14
  • 235
  • 294
  • There are AWS SDK with CloudFormationClients that can help retrieve the state from CloudFormation. Don't know what languages you use but there are AWS SDK for Java, Go, .net, etc. – Tim Bassett Feb 21 '22 at 00:27
  • Ideally SDK shouldn't be involved at this point. We're dealing with infrastructure, not actual application code. – Yuriy Galanter Feb 22 '22 at 11:06
  • @YuriyGalanter As I explained TF is not CDK nor CloudFormation. It does not have any state file outside of AWS. – Marcin Feb 23 '22 at 10:34
  • Yes I understand that. So I am still looking for the ability for different people from different locations to work on the same infrastructure. – Yuriy Galanter Feb 23 '22 at 14:17