top | item 37810062

(no title)

Longwelwind | 2 years ago

Why would you want to store the state in Git?

This means that if you have a CD pipeline (triggered itself by a commit) that does `terraform deploy`, you'd need to have your CD pipeline do commit _again_ to save the changes to the TF state files.

On top of that, you lose the ability to re-run a previous CD pipeline to rollback to a previous version of your infrastructure.

The goal of Git is just to store the lifecycle of a piece of software, imo. It's not the reponsibility of the repo to know the state of the deployment.

discuss

order

fishnchips|2 years ago

You’d just use Git as fancy storage with some extra features. You could use a separate repo for that.

But I agree that the gain from that is not crazy.