5
• The CI CD pipeline is as follows for this project. For
initial set up:
• Set up jenkins
• Install dependencies for local development
• Create AWS infrastructure using Terraform
• For application development:
• Make development change
• Commit to git
• Update AWS stack using a shell script
• Push to repository after integrating GitHub with
Jenkins and also with JIRA.
• Jenkins build automatically runs based on triggers
• Git Commits
11
• After you initialize, Terraform creates
a .terraform/ directory locally. This directory contains the
most recent backend configuration, including any
authentication parameters you provided to the Terraform
CLI. Do not check this directory into Git, as it may contain
sensitive credentials for your remote backend.
• The local backend configuration is different and entirely
separate from the terraform.tfstate file that contains state
data about your real-world infrastruture. Terraform stores
the terraform.tfstate file in your remote backend.
12
• To solve the problems described above, we can use
AWS S3 services as Terraform state storage
media. Terraform has built-in support for using S3 as a
remote state storage medium. When using S3 as a
Terraform state storage medium, we need to add other
functionality such as locking mechanisms, version
management, and encryption. We can use AWS
DynamoDB and AWS KMS services to implement
Terraform state locking and encryption mechanisms
on AWS.
• We will set up Terraform to provision required
infrastructure (like a set of AWS EC2 instances with all
their dependencies) and then connect that to an
Ansible which then transactionally configures these
EC2 instances using our playbook.