A guide to set up automatic infrastructure provisioning with Terraform Cloud & GitHub Actions. Leverage Infrastructure as code(IAC) and GitOps to automatically update your infra based on a GitHub repository.

In this tutorial, we are going to connect Terraform Cloud with a GitHub repository and leverage GitHub actions to provision Cloud infrastructure on AWS.

We are going to combine IAC and GitOps approaches and manage our cloud resources via code.

Infrastructure as code(IAC)

The modern way to manage Cloud Infrastructure is to treat it like software. The number of resources that we have to handle is increasing daily along with their elasticity. The scale of the infrastructure is getting bigger and bigger every day and too difficult for people to manage with traditional ways.

Even more, the API-driven cloud environments provide many more options for automation than before. Managing our Infra as Code allows us to benefit from versioningconsistencyrepeatabilitycollaborationtraceability while configuring complete solutions in environments that are changing rapidly every day.

GitOps

GitOps is the operational framework that allows us to take the best practices used for application development to infrastructure automation.

By combining our Infa as code and GitOps approaches we can now safely operate on our infrastructure by leveraging the same CI/CD tools and automated test pipelines and deployments that we use already.

GitOps provides us the ability and framework to automate our infra provisioning. In practice GitOps is achieved by combining IACGit repositories, MRs/PRs, and CI/CD pipelines. First, we define our infra resources as code.

#gitops #terraform #github-actions #aws #github

Automate infrastructure provisioning with Terraform Cloud & GitHub Actions. IAC + GitOps
1.60 GEEK