Re:Terraform should have remained stateless
by mountainriver on Saturday May 28, 2022 @11:44AM
(#31541212)
Yeah but then you don’t have to worry about the state getting out of sync which is one of the biggest problems. Also versioning is a pain
[ Parent
| on HN ]
Re:Terraform should have remained stateless
by ImPostingOnHN on Saturday May 28, 2022 @12:14PM
(#31541469)
yeah, but then you DO have to worry about scanning every single resource you control, every time you plan and run
Re:Terraform should have remained stateless
by hellcow on Saturday May 28, 2022 @12:20PM
(#31541526)
I built pretty much the system you’re describing for my company (a stateless terraform alternative) and this scan that you cite as a negative happens in… 100ms in parallel? Roughly the same amount of time it would take to download a state file? Dunno about you but ensuring state is always accurate and in-sync is well worth the trade-off to me.
Re:Terraform should have remained stateless
by enobrev on Saturday May 28, 2022 @01:13PM
(#31541986)
I'm curious, and not antagonistically, about the size and variability of the infrastructure you're working with, on how many platforms it's running, and how many people are in charge of it.
Is this tool private or available for us to try out?
Re:Terraform should have remained stateless
by hellcow on Saturday May 28, 2022 @02:34PM
(#31542589)
It’s small, under 50 servers running OpenBSD and Linux under a wide variety of configurations (including gpu), 6 databases, and Redis. Though the system is easily extensible to other clouds and resource types, it only needs to work on GCP right now. Been running it in prod for the past 3 or 4 years—no outages, no downtime, no surprises. Doubled infra over the holidays then scaled everything back with no issue.
The stateless approach has worked really well for us.
This is the reason we didn't get Terraform. In a windows shop the state is never the same because most people will fix it via the UI and then the state file becomes useless
Re:Terraform should have remained stateless
by ImPostingOnHN on Wednesday June 01, 2022 @08:15PM
(#31589788)
sounds like a totally reasonable decision
Re:Terraform should have remained stateless
by bradknowles on Sunday May 29, 2022 @02:18PM
(#31551410)
At small sizes, this probably works reasonably well. However, as you scale, the performance will get worse and worse, and you run the risk of hitting rate limits and/or missing stuff.
So, fine for you in your personal small environment, but maybe not something suitable for Terraform in general.
Re:Terraform should have remained stateless
by mountainriver on Saturday May 28, 2022 @01:28PM
(#31542093)
That does not seem problematic with modern APIs and concurrency. Two sources of truth is highly problematic
Re:Terraform should have remained stateless
by rad_gruchalski on Saturday May 28, 2022 @02:47PM
(#31542678)
But it is problematic when you deal with larger infrastructures due to rate limits.
Re:Terraform should have remained stateless
by mountainriver on Tuesday May 31, 2022 @08:41AM
(#31568832)
I can’t imagine you would ever hit a rate limit, how often are you deploying large sums of infrastructure? For me it’s maybe a couple times a day and the surface area is small
AWS API Rate limits are very surprising. I've hit them on new accounts when trying to deploy terraform based code, and that's without having to literally scan the entire account.
If I have 3k machines running in an autoscaling group I think it would be ridiculous to have to hit each one of those with API calls to try and infer which were or weren't part of my state. Building a simple high availability VPC is about 72 resources just by itself.
I don't think people advocating for "the cloud is the state" realize how big even trivial environments can get- let alone complex ones.
Re:Terraform should have remained stateless
by mountainriver on Tuesday May 31, 2022 @12:36PM
(#31571606)
Huh I've never hit rate limiting on GET with AWS, could just be my luck. This also might not be the answer for every problem, but could be nice for some
Re:Terraform should have remained stateless
by rad_gruchalski on Wednesday June 01, 2022 @12:42PM
(#31584517)
“I have never” doesn’t equal “it doesn’t happen”.