How to use terraform_data in CDK TF?

How do we use terraform_data ( The terraform_data Managed Resource Type | Terraform | HashiCorp Developer ) in CDK TF?

Hi @Samrose-Ahmed :wave:

Thanks for asking! CDKTF currently does not have direct support for this. I just created an issue to add support: lib: Support `terraform_data` built-in resource · Issue #3142 · hashicorp/terraform-cdk · GitHub

In the meantime, you could use the escape hatch on the stack to add the config for this manually (related docs):

stack.addOverride("resource.terraform_data.replacement", {
  input: revision