-
Hi everyone. Thanks for this very interesting product! Is it recommended to commit any files generated by Terramate to Git, or should we keep them in a .gitignore and generate them on-demand in CI/CD before we do the plan/apply? My main concern with committing them is that it might result in orphaned generated files when I e.g. change the file name of a generated file, etc. Would change detection still work if I keep them in .gitignore? Thanks in advance to anyone answering! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Change detection is highly dependent on the files being checked in in the current version of terramate. In addition terramate might change generated code slightly in different versions or in worst case and edge case triggers a bug, that could be detected by changes in the generated code easily. Without checking in the generated code won't be available and any issues in generated code is invisible to a reviewer. We have a feature planned in the backlog that would only generate a checksum that you would still need to check in but that can provide you with slightly better safeguards and supports full change detection as the checksum will change for different versions. In addition the "oudated code safeguard" can trigger accordingly. We prefix our generated files with e.g. Would such a feature just checking in checksum benefit you too? |
Beta Was this translation helpful? Give feedback.
-
Sorry for hijacking this: is it the intention that the need for checking in the generated files will go away in the future? |
Beta Was this translation helpful? Give feedback.
Change detection is highly dependent on the files being checked in in the current version of terramate.
In addition terramate might change generated code slightly in different versions or in worst case and edge case triggers a bug, that could be detected by changes in the generated code easily. Without checking in the generated code won't be available and any issues in generated code is invisible to a reviewer.
We have a feature planned in the backlog that would only generate a checksum that you would still need to check in but that can provide you with slightly better safeguards and supports full change detection as the checksum will change for different versions. In addition the "oudate…