Hacker News new | past | comments | ask | show | jobs | submit login

So the position is Terraform should have state, but rather than keep it in one place such as an S3 object, it should be spread across the metadata of many resources?

Some issues with that:

- Fetching the whole state would be hugely impractical due to the number of API calls

- The risk of losing state information by a resource being deleted outside of Terraform is greater

- Again, not all resources have metadata that could be used to store state




>- The risk of losing state information by a resource being deleted outside of Terraform is greater

This isn't losing state information though! That is the state. If state information were kept outside this it would now be wrong which means terraform *would do the wrong thing.


No because the metadata on the deleted resource is now lost.

With the information being stored outside the resource, we know that it was deleted and the metadata about it.


That's not state information though, that's metadata.


If some state information is stored using metadata then we need that metadata to know the total state. The contents of TF state is more than what can be read from the provider APIs often.


Yeah but the extra stuff they add is a trade off and lots of people would rather not have two sources of truth to have it


Most of the people I know who use Terraform use Terraform as the source of truth.


You can wish things are a certain way but that doesn't change reality no matter how nice that would be.


Seen this many times. People using a tool in an unintended manner and then bashing the tool.


Huh so you access your infra through terraform?


This conversation is embarrassing for both of you.


Tell me more please. There’s always something new to learn.


its super embarrassing if you thing TF is the source of truth when the cloud provider clearly is


My infrastructure drifts from my source of truth.


Through an API, really.




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

Search: