How to explicitly set logical id?

How can I explicitly set the logical id for a resource using CDKTF? E.g. I’m creating a TerraformVariable and I don’t want the synthesized variable name to include any hashes.

Hi @Samrose-Ahmed :wave:

Is your TerraformVariable defined in a construct or in the root of your stack? If it is in the root of your stack, it should not contain any hashes (if you are using CDKTF CLI with the default feature flags defined in the cdktf.json).

In either way, it is possible to use .overrideLogicalId("my_id") to override the default one that might contain hashes.

– Ansgar