Let's build a Terraform provider from scratch
Terraform is the leading Infrastructure as Code tool. However, a lot of developers don't truly understand how it works.
Do any of these quotes describe you?
I'm very much a beginner at Terraform. Terraform has always been this terrifying beast that I just used. Whenever I work in it, I just copy some code from other developers / examples / Stack Overflow / ChatGPT... but I don't really understand what Terraform does or why it works. I vaguely heard it is using a state file but I have no idea what it is about.
I am a intermediate Terraform developer. I understand how to use it but I don't always get what is happening under the hood and I would love to learn more.
I have written a Terraform provider before in Go. The framework made it very easy, it still don't get what's happening under the hood and would very much like to learn more. I actually also don't understand Go that well so would love to write a provider in my main language.
I am an application developer and I'm very curious to learn how Terraform and other HashiCorp plugins work under the hood. How do they make their applications so extensible?
Then this course is for you!
What will I learn?
- How does Terraform work? What does it do?
- What are Terraform providers anyway?
- What are resources? What are datasources? What's the difference?
- What is the state file? Why is it relevant?
- How is Terraform similar to GraphQL?
- And much more
- How does the Terraform language (HCL) work? How should I think about it?
- What is gRPC? How is it used by Terraform? What are some popular alternatives?
- What is protobuf and how does it compare to JSON?
- What is mutual TLS and when would you use it?
- And much more
Prerequisites
The only prerequisite knowledge is some programming skills (you'll be writing your own provider!). You can follow along in your language of choice. It should have a gRPC library and you should be able to make HTTP requests, but many of the most popular languages have this. To name a few:
Furthermore, I'll assume you have used Terraform before but it's okay if you don't know how to write Terraform programs. We won't be writing that many Terraform programs
You should have Docker & Terraform installed on your laptop. If you have Go installed, some steps might be nicer but I'll also provide instructions on how you can use Docker instead.
An advent calendar-style course
Now, specially for December 2024, we will be offering this course in bite-sized format as an advent calendar. Every day you can open an (virtual) box, a gift to yourself with the next bit of instructions of writing your own Terraform provider. Some days will just be building the next part. Other days you'll also get some extra explanation about how Terraform works. Surprise yourself every day with a little bit more understanding of Terraform and have a merry Christmas.
Frequently Asked Questions
What is an advent calendar style course?
What is included in this course?
What if I get stuck?
How can you offer this course with so many programming languages?
Can I join later?
Can I immediately start?
I am on holidays for part of the calendar, will that be a problem?
Do I get a physical calendar?
How can I get this for my team?
Why are you teaching this course?
Can I get an invoice?
I have more questions