Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Have Terraform plug into your Git history, take the Terraform code from the previous commit, and use that to calculate the old tree

This is much much more difficult than it sounds if you want to be able to handle any amount of refactoring or repo reorganization and not be cut off from being able to handle resources from "before" a certain time.

How terraform or provider upgrades would work is another minefield. It's not just a matter of having access to the old terraform source, it would need to evaluate it with the same terraform version and providers - so those would have to be acquired and run within the state backend.

And then this is still assuming the previous run that you're trying to emulate was applied 100% successfully...



Author here, you're right, provider versions are something I did not account for.

Good catch!


What about sensitive values? I don't want those in git history.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: