Dynamically manage and maintain multiple Terraform environment lifecycles with Jenkins.

TL;TR

Terraform:

Terraform env:

Terraform init:

Terraform Plan:

Terraform state:

Cloud bucket:

Terraform workspaces.

Getting to business:

git repository

Set your AWS credentials:

Initiate the project:

$ cd base
$ terraform init
$ terraform plan
$ terraform apply

Created components:

Jenkins:

Required Jenkins plugin:

Node installation

Job settings

Setting AWS Credentials

Email settings

The Pipeline

Jenkinsfile — Declarative Pipelines

The terraform command function

Pipeline settings

Checkout & Environment Preparations

Actions

Email notification

DevOPs engineer at Tikal Knowledge (Fullstack as a Service) https://www.linkedin.com/in/natanb