terraform-cdk
terraform-cdk copied to clipboard
Convert: Introduce "production-ready" flag
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
This flag would instruct convert to maintain the logical IDs throughout the converted code & it would throw errors if the TF overall does not seem to be sound or if provider versions are missing. Sort of a strict mode that has the goal to produce CDKTF code that could theoretically be used with the same backend and a plan would show no diff. Although this might be a bit of a north star goal since the conversion is hard to make perfect in every detail.
Once this flag is implemented we can strip the extra soundness checks and logical id overrides from our normally produced cdktf code and get a more permissive version of convert to convert shorter incomplete snippets
References
Sounds like --strict could also be a good name, what do you think?
I don't like strict because it does not cover the logical id part, at least in my understanding of the word 🤔
production-ready seems like a strange flag name. strict does seem closer to me.
What do you mean by does not seem to be sound?
I would expect the init from tf project flow to continue functioning as is. The convert command does seem like it should emit the logical id override though. Would be good to have user feedback to confirm the use cases though.