r/devops • u/TechnologyMatch • Oct 02 '26
Ops / Incidents When does self service infrastructure become too much self service?
We pushed pretty hard to let dev teams handle more of their own infrastructure changes.
It worked, but now the platform team spends a lot more time reviewing Terraform, fixing edge cases, and explaining context that isn't obvious from the repo.
At some point it feels like the bottleneck just moved instead of disappearing.
Has anyone found a good balance between developer ownership and keeping infra changes sane?
36
Upvotes
46
u/sikian Oct 02 '26
My understanding is that if you're reviewing terraform PRs, it's not really self service but rather devs owning part of their infra. Nothing wrong with it, but it means that the shared ownership has its chores.
For self-service, my understanding is it's significantly more streamlined with little to no involvement of the platform team other than creating the necessary platform to support/fulfill the requests.
11
u/JustAnAverageGuy Oct 02 '26
That can be a really hard line to find for a lot of organizations, and it really depends on how big your team, and the org you support are.
I come from (really, really) big corporate. My line in the sand was always the pod layer in our k8s. Anything below the pod layer requires a ticket to the appropriate platform team. Dev teams can eject pods from hosts, but not pick the new host, as we handled load distribution for reliability purposes. They can scale up and request new/additional resources that already exist from a library of configuration options, but they can not create something new or write terraform scripts themselves.
7
u/jascha_kviklet Oct 02 '26
I'm a big fan of self service (I built e.g. this for db access: https://github.com/kviklet/kviklet)
But imo self service should go the way that you lay out a golden path as an infra team and walking that path should no longer require review.
So there is one way of setting up a db, one way to deploy a container, one way to get a domain, etc. so that the most common cases are covered and follow best practices. And are available to the dev team as a clean building block.
If you still have to review infra individually it likely isn't bundled into nice modules/GitHub actions etc yet
4
u/DigitallyBorn Oct 02 '26
In my org, the central team manages the repo and cicd pipelines that the teams use to manage their infrastructure. Where we can, the IAM roles that the pipelines use only have permissions to do “safe” things and we have OPA policies reviewing the plans before merge for compliance requirements . In these cases, we don’t reviews.
We build in lots of “have you done x?” reminders to lead them to compliance paperwork processes.
3
u/danekan Oct 02 '26
Self serve should have guardrails and it’s too much when someone wants changes to that. Modules can be consumed within a teams’ repo and be approved by them. But module changes should signal an architecture and/or security review by o it side teams. The reviews within the boundaries of module guardrails are more or less business validation/logic checks (‘do we want this?’) vs the module reviews reviewing architecture and security
2
u/Sheriff_Banjo Oct 02 '26
It's an eternal battle with no right answer
2
u/planes-and-infra Oct 03 '26
Devs should not be writing their own Terraform. They should be using some kind of abstraction over top of TF that the infra team manages.
1
u/ArieHein Oct 02 '26
I will give you an example i implemented in previous employer. When you create a vm, you can configure the amount of cpu, memory, disk, family and more. Naturally you parameterize it all, then create matching form in what ever you chose to use, let say a servicenow form.
Now every request that comes you have to validate that the the machine family exists or available, that the number of cpu is logical (cant be number that is odd), that memory devides in 1024, that disk space isnt random number.
You can add the validation at the form sometimes at the closest point to the customer or on your side (hopefully not manual).
Then the values are sent to what ever infra tech you choose.
A month later, families are removed, specific count of cpus/memory /disk no longer available. And you have to change form / change logic.
Lets look at it differently.
You create a repo with say sizes.json, in it you cretae a structure based on workload and size.
Workload - Size - CPU - Memory - Disk Size General - Small - 2 - 4 - 40 General - Medium - 4 - 8 - 80 Data - Regular - 16 - 256 - 256
The form reads the json and generates the ui. Workload is a field in the form for user to choose. NO user input to validate. Form leaves a field for custom that triggers a manual validation. Track the requests, multiple people ask General with more resource .. You update the json. Form immediatly generates it. (reducing the need for depending on service now specialists to create and approve) .
Team owns their stack.
The json becomes your governance.
When ever a value can be infered or calculated based on your rules, the rest is for user input.
I dont need a user to tell me how to call the subscription or resources. I know what workstream they are from as they added to the project nane (or i inferd from their user prooerties) , the project id/budget, who the personel are/roles. (potentially getting that from a different internal system via api)
Rest is purely automation.
For infra, i took modules combined them into mutiple stacks (i used that term before hashi used it for their cloud) and the user chooses a stack that matches. The stack exposes ONLY the minimum inputs needed.
Your description is a nicer ui on a dreaded service now...
Place a rule of 5 clicks from request to deploy then break the process to see where to automate and what values are really needed. Leace room for custom but close the feedback loop and add a XL machine type whule maybe removing the Small one as no one is using.. Needless to say, metrics are key.
1
u/CrazyWizard9835 Oct 02 '26
IMO is too much when you delegate infrastructure that can expose security issues. Developers never cares if their service it's well protected against even the most basics attacks.
Usually I give them a Development environment with private access only, where they play all they want, and when it's ready I move it myself to QA environments to fix all the security integration problems (bad routing, exposed connection strings or no Vaults usage, unauthenticated APIs, etc,etc)
1
u/SilverOrder1714 Oct 03 '26
I agree with most of the comments here - it's not truly self-service if changes still require a "platform" person to hand-hold them.
The way forward seems to be to make the platform absorb some of the cognitive load and make it really easy for devs to tread the most common path (read golden paths) and only use "platform engineer" bandwidth only for the rare exceptions.
1
u/rtpro Oct 03 '26
The main purpose of self service is it improve Developer's satisfaction by not blocking them on things they could do by themselves while adhering to the organization's guardrails.
Do you measure developers satisfaction? I would start there.
1
u/engineerL Oct 03 '26
Everyone and their mother has found this balance, and you do it with Kubernetes CRDs. There's really no other way. Don't listen to the "look at my custom terraform modules" crowd. They're walking a dark, narrow path
1
u/Cycle_HeidarEldberg Oct 06 '26
Yeah I recognize this pattern.
There are champions out there that take the tools and run with it and do great and then there are those that seem to always be fighting against the current with new edge cases etc.
I feel Terraform is just not a good place to create the abstraction between infrastructure and app teams.
I think long term it is better for both parties to have a more opinionated platform be the abstraction layer, so there is way less wiggle room on how to go about things.
There are compromises that come with that but I believe that the vast majority of the pushback on that can be filed under "we need to support X because of legacy" and legacy is not a good reason to compromise on your platform primitives — that's how you co-opt technical debt.
1
u/qoq-daq Oct 07 '26
https://en.wikipedia.org/wiki/Inner-platform_effect?wprov=sfla1
Congratulations, for independently discovering the IPE antipattern!
1
u/Few-Commission-3369 Oct 08 '26
self service starts becoming a problem when teams can create infrastructure faster than anyone can understand or maintain it giving people freedom is useful but without clear limits ownership and cleanup rules the cloud can turn into a collection of things nobody really owns trusted tech matters more when that flexibility still has some structure behind it