/cdays-2021

Demo for the CommunityDays 2021

Primary LanguageHCL

Infrastructure as Code with Terraform

In this repository you can find the demo presented at the Community Days 2021 event.

Demos

Demos are grouped into different foldes:

  • Demo 1: includes a Terraform file with all the code written in the same file to describe the infrastructure. The goal is to demonstrate the syntax and the basic commands like terraform fmt, terraform init, terraform validate and terraform apply;
  • Demo 2: includes the same Terraform code in a single file but with another resource to be deployed. The goal is to showcase how adding a new resource won't change the plan to re-deploy the entire infrastructure, but only the missing parts will be added during the planning and after when applied;
  • Demo 3: contains the same infrastructure code, but demonstrates the usage of modules to start splitting the content when infrastructure gets more complicated;
  • Demo 4: with the same infrastructure code organized with modules, we're now adding variables and handling secrets in a better (and more secure) way. The same code is then used by the GitHub Action pipeline that will validate the code during PRs and will apply the newly created infrastructure (or updates) once PRs are merged back into main.