
Terraform has emerged as a key player in the DevOps world for defining, launching, and managing infrastructure as code (IAC) across a variety of cloud and virtualization platforms, including AWS, Google Cloud, and Azure. This hands-on book is the fastest way to get up and running with Terraform. Gruntwork co-founder Yevgeniy (Jim) Brikman walks you through dozens of code examples that demonstrate how to use Terraform’s simple, declarative programming language to deploy and manage infrastructure with just a few commands. Whether you’re a novice developer, aspiring DevOps engineer, or veteran sysadmin, this book will take you from Terraform basics to running a full tech stack capable of supporting a massive amount of traffic and a large team of developers. • Compare Terraform to other IAC tools, such as Chef, Puppet, Ansible, and Salt Stack • Use Terraform to deploy server clusters, load balancers, and databases • Learn how Terraform manages the state of your infrastructure and how it impacts file layout, isolation, and locking • Create reusable infrastructure with Terraform modules • Try out advanced Terraform syntax to implement loops, if-statements, and zero-downtime deployment • Use Terraform as a team, including best practices for writing, testing, and versioning Terraform code
* Small composable Terraform modules
* Don't manage IaC declarations alongside code in a polyrepo
* Direnv for managing env configs across repos
* Manage k8s using k8s manifests and not terraform files (kubectl provider gives us this)
* Delegate flux management to flux-cli
* Auto-unseal Vault to capture and protect the vault token
Then a list of recommended reading:
* Terraform Up and Running
* Building Microservices
* Site Reliability Engineering
This list is more tactical since we didn't build the system, we were auditing their current setup.
What I can recommend is to treat your modules for what they are: Public library functions. Meaning common sense advice for those applies:
- Approach writing modules by actually designing an API for it. Don't treat it as a folder to dump resources in.
- Make your API as small as you can get away with.
- Its variables and outputs should be, whenever possible, describe a generic black box that could have its internals swapped.
- Make modules composable where you can. Being able to pass around entire module instances in variables because they have clean, stable APIs is very nice.
- Accept some things will inevitably leak but put in the effort to minimize them.
This blog post and the book from the authors (Terraform Up & Running) has some good ideas that got me started with the basics, but there's not much written with regards to more involved usecases: https://blog.gruntwork.io/how-to-create-reusable-infrastruct...
This is ridiculous - AI doesn't need to be fed a PDF of a Terraform book to know how to Terraform. Blowing out context with hundreds of OCR'd pages of generic text on how to terraform isn't going to help anything.
The model that is broken is really ultimately going to be "content for hire". That's the industry that is going to be destroyed here because it's simply redundant now. Actual artwork, actual literature, actual music... these things are all safe as long as people actually want to experience the creations of others. Corporate artwork, simple documentation, elevator music.... these things are done; I'm sorry if you made a living making them but you were ultimately performing an artisinal task in a mostly soulless way.
I'm not talking about video game artists, mind you, I'm talking about the people who produced Corporate Memphis and Flat Design here. We'll all be better off if these people find a new calling in life.