**Why you should store your IaC state files in object storage**
We tell all of our clients to use S3 or their equivalent object store from their cloud as there storage for their terraform and open tofu state. We always suggest against using 3rd party vendors, databases, and of course, not local state. 🙅
There are 3 reasons for this:
1. Object storage is highly available and highly durable. Services like AWS S3 are replicated almost 10 times and the number of nines for durability is the highest SLA that I’ve seen in the industry. This means you don’t need to worry about losing data and you can count on getting access to that data when you need. 9️⃣9️⃣
2. Versioning, encryption at rest, and RBAC are already solved problems. If you're already using the cloud, then these problems are dealt for you OR you're already dealing with them in some aspect or another. These problems are all important aspects of IaC state management that you want to be thinking about . If you can lean on an existing system where this is all easily handled for you, it decreases complexity. 🥂
3. You own your state in a centralized location that is **very unlikely** to change. We see this with some customers where they end up storing their state in their vendor (Terraform Cloud would be an example) state storage and then they bring us in to migrate them away from that vendor. If that case, they need to migrate their state to another system, which becomes another migration task and pain point. On the other hand, you’re very unlikely as an organization to migrate to another cloud (this happens and 90% of the time I'd say it's a mistake). As a result, if you start off with your state being in object storage in your cloud, then it’s very likely to live there forever which means you can change the vendors or solutions surrounding your IaC with less pain. 🏃♀️➡️
Where do you store your state? If it's not in object storage, why?
#terraform #opentofu #infrastructure #infrastructureascode #iac #platformengineering #platforms
•Vice-President of Project Planning at IAAS Nepal LC AFU •Partnerships and public relations coordinator at IAAS Asia Pacific •Student at Agriculture and Forestry University •Research Explosive officer at IAAS Nepal
3mo💚💚