Terraform's life cycle in a CI/CD process

So far, we have seen and executed, on the local machine, the various Terraform commands that allow us to initialize, preview, apply, and destroy an infrastructure and to format and validate Terraform code. When using Terraform locally, in a development context, its execution life cycle is as follows:

The steps shown in the diagram follow this sequence:

  1. Code development
  2. Code formatting with terraform fmt
  3. Initialization with terraform init
  4. Code validation with terraform validate
  5. Planning with terraform plan
  6. Manual verification of Terraform changes on infrastructure

But IaC, like an application, must ...

Get Learning DevOps now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.