Skip to content

GitOps demo of Terraform infrastructure as code (IaC)

Notifications You must be signed in to change notification settings

doitintl/terraform-iac-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Change management has evolved given infrastructure is now API-driven. Traditionally ITIL change management required maintaining separate systems for compliance, but modern organizations leverage GitOps and infrastructure as code (IaC) tools to automate and streamline processes as demonstrated in this repo.

Modern Change Management

At DoiT International we advise cloud customers to implement modern change management using automated, self-documenting, processes as illustrated below.

GitOps IaC Change Management

Prerequisites

Using this example assumes you have the following in place:

Install

# set config
gcloud config set project <project-id>

# clone repo (or fork it)
git clone [email protected]:doitintl/terraform-iac-demo.git
cd terraform-iac-demo

# reset git so you can push to your own repo
rm -rf .git
git init

# initialize project
./bin/setup.sh

Configure

You will need to create a Git source code repository and connect it to Google Cloud Build as instructed below. Connect Github repository to Cloud Build

Usage

Once you make sure you connect the repository for Cloud Build, and create a push trigger, you can then commit, set your remote, and push your code. This should trigger a build and Terraform tasks will run. See the document above (although dated and this repo is updated for later Terraform versions) for tips.

Automated builds

Clean up

If you are just testing this functionality, to avoid incurring unnecessary cloud billing charges be sure to delete your project or follow these steps:

  1. edit main.tf in /prod and /dev folder and remove modules
  2. commit and push changes to trigger infrastructure changes
  3. run the ./bin/teardown.sh after resources removed

Contributing

This repository is maintained by the staff at DoiT International

About

GitOps demo of Terraform infrastructure as code (IaC)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published