Disclaimer
Since this is a series of posts, I’ll leave the links here as we progress through each topic discussed.
- Introduction (This post)
- [Setting up the Environment](https://blog.merazzi.com.br/en/terraform-from-zero-gcp-part-2-setting-up-environment/)
Introduction
This is the second post where I talk about using Terraform to create infrastructure using code (the famous IaC). If you didn’t see the first post (made in 2022!!), I recommend reading it to install and prepare the local environment (calm down… We’ll get to the cloud – I hope):
https://blog.merazzi.com.br/en/installing-terraform-creating-first-object-azure
This time, we’re going to take a step further and change clouds. Let’s talk a bit about GCP here.
What I want to try to show in this series of posts:
- **Setting up the environment**: Creating GCP account, Service Account and authentication.
- **Creating the first resource**: VPC, bucket or instance – Let's see... 🙂 .
- **Modularization and best practices**: variables, outputs, workspaces and folder structure.
- **Remote state with GCS**: how to maintain control of what was created.
- **Deploying real resources**: machines, databases, GKE.
- **CI/CD with Terraform**: using GitHub Actions or GitLab CI to automate everything.
- **Advanced topics**: multiple environments, secrets management, and much more.
Anyway, it’s quite a lot, but I think it will provide really interesting content for the blog. At least I think that having this in mind, I’ll be able to get back to writing more frequently, something I’ve wanted to do for some time.
Some simple prerequisites, but I won’t go into details:
- Basic knowledge of any cloud (but if it's GCP, better):
- Basic use of Terminal (Linux, Mac or Windows)
- Google account with access to GCP (use the free credits!!!)
All code will be available in a repo on my Github for later reference (I’ll upload as I progress, but I’ll put the link as soon as we start).
Did you like the proposal? Have you used Terraform before or is this your first time with IaC? Comment here and share this post with others who also want to learn!