surely, state needs to be tracked somehow. what would an alternative even be?
Why? There are many possibilities, just not that efficient. One of them would involve tagging. The problem with that approach is that not all resources are taggable, and it would take longer to query them.
also this requires N api calls each time you check the state for an update. scaling that to a larger team may be difficult due to rate limits.
infra as code tools have to operate within the parameters that the provider apis allow. so when i say it’s hard to imagine, i’m thinking about limitations of the underlying apis.
totally possible im missing something obvious, but there’s a good reason that centralized state exists today. genuinely curious about how we could ditch it in a reasonable way with the existing big cloud APIs.
I'm sure there are complications i don't care to see here, but why is "this is what is actually deployed" not the default case?
Refreshing the state file (and reconciling differences) also uses the cloud provider API’s. I don’t think we’re going to get better than that.
Unless someone makes a common standard for resource reporting that all cloud providers implement.
that’s part of the case for a centralized state, to have an additional place that describes what should exist and what it looks like.