Terraform CDK and resource: random_id

Hello,

I didn’t find any examples for Terraform CDK with any implementation of: resource “random_id”

Does it support by Terraform CDK with a Python ?
https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id

Thanks!

Hi!

Yes, the random provider is supported. You can add it to the cdktf.json and run cdktf get to generate bindings to that provider.
It is described here in the docs: terraform-cdk/using-providers-and-modules.md at main · hashicorp/terraform-cdk · GitHub

Happy to assist if you have any further questions!

1 Like