DEV Community

One staging for each engineer: introducing Layerform

Lucas F. da Costa on August 29, 2023

Layerform allows developers to spin up multiple instances of their applications while reusing core parts of their infrastructure. That way, compan...
Collapse
 
cherryramatis profile image
Cherry Ramatis

Awesome didatics! I’m not a Devops person at all but quite curious to read more about layer form

Collapse
 
guto profile image
guto

Amazing! I'm currently studying about Kubernetes, Terraform and delving a little deeper into the DevOps area and I can say that Layerform has incredible applicability!

Collapse
 
hugomrbr profile image
Hugo Leonardo Moura

Sounds interesting.

What are the differences or pros and cons do you experience from having an internal TF module (maintained by Core team) that would output values that other TF code (or layers) would need?

Another question: What happens when a default state is modified? do engineers need to re-run layerform spawn? (in other words, let's say a Core team needs to make a major change in their core infrastructure, what would be the experience to all engineers?)

Collapse
 
lucasfcosta profile image
Lucas F. da Costa • Edited

The engineers updating layers run layerform configure to provision layers for all other engineers to use. Then, anyone running layerform commands after that will have an up-to-date definition.

Collapse
 
renanvidal profile image
Renan Vidal Rodrigues

Great

Collapse
 
kjenney profile image
Ken Jenney

This seems an overly complicated method with little benefits. An engineer can have their own namespace in a shared cluster while also creating their own separate resources with their own separate names tracked in their own separate state. I've created and managed clusters like this. The key is to lock down RBAC and keep namespaces unique. Then you've got a naming convention based on the namespace name that ensures uniqueness with newly created resources.

Collapse
 
zoldyzdk profile image
Hewerton Soares

Awesome! Saved to read later!

Collapse
 
marcelomagal profile image
oChefDev

Very interesting. The tool is particularly beneficial for managing complex, scalable projects.

Collapse
 
ilonavarro profile image
Ilo Navarro

Nice! I need to learn more, but really nice project!

Collapse
 
sleao profile image
Saulo Leão

Can't you use s3 as the backend for terraform? So it saves the state in s3 and keeps everyone updated?

Collapse
 
lucasfcosta profile image
Lucas F. da Costa

Yes, that's exactly what the S3 back-end does! We still need to implement proper locking to avoid bad states due to race conditions though.

Collapse
 
softwaresennin profile image
Lionel♾️☁️

Thanks so much for this writeup @lucasfcosta great job. Layerform sure does have a lot of pros. I will be proposing this to our team.