cdktf / cdktf-tf-module-stack

A drop-in replacement for cdktf.TerraformStack that lets you define Terraform modules as constructs
Mozilla Public License 2.0
20 stars 2 forks source link

What is the exact difference between cdktf synth and this? #294

Closed shinebayar-g closed 8 months ago

shinebayar-g commented 9 months ago

Description

Documentation at https://developer.hashicorp.com/terraform/cdktf/concepts/hcl-interoperability mentions just run cdktf synth, copy the cdktf.out/stacks/<stack-name>/cdktf.json. This works.

It's unclear why this repository exists and what is the difference between cdktf synth json output and this.

Could you explain the use case?

Links

https://developer.hashicorp.com/terraform/cdktf/concepts/hcl-interoperability https://developer.hashicorp.com/terraform/cdktf/develop-custom-constructs/publishing-and-distribution

Help Wanted

Community Note

DanielMSchmidt commented 8 months ago

Sure, the normal TerraformStack has a mandatory backend being applied, the providers are pinned to specific versions, etc. This makes it harder to create a shareable module out of the generated code.