-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From Terraform to CDK - Unique ID #279
Comments
Hey @benoitmenard-richemont - thanks, that's a great question!
There's a feature request to handle this particular case #248 A bit of background: One of the core ideas of the CDK is to have layered abstractions for your resources. What we generate with To some extent, this is similar to what you could do with Terraform modules. However, At the moment, this is done via:
The naming logic is stemming from the AWS CDK (Cloudformation) where there's a hard limit (255 characters) on resource names. The actual name will be cut at As you might think: Well, does this apply to Terraform? At least when it comes to the length restrictions it doesn't. I don't have an exact upper limit, but I just planned a resource with a > 2000 character name. However, I'm not sure it would be reasonable to allow names like that: One other aspect is maintaining compatibilty with the constructs package, where the naming logic should come from. To sum it up: the only hard requirement is guaranteed uniqueness across the stack, with a few soft requirements attached to this. The current way works reasonably well, and there are a few open issues to make it easier to work with it: see #248, #247, #219 |
Closing as question was answered and the problems discussed are tracked in other issues already. |
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi,
I worked a bit on the CDK, and I was wondering of how to migrate existing Terraform to CDK.
The CDK generate a unique ID for each resource/module. But this behavior may be good for new infrastructure, but not for existing one. Why this behavior ?
Thanks,
The text was updated successfully, but these errors were encountered: