Skip to content

prashantsuk/Terraform_Jenkins_integration_AWS

 
 

Repository files navigation

isaac-arnault-terraform-jenkins.jpg

• Programming: HCL (Terraform)
• Repository: GitHub
• Cloud: AWS
• Database: Jenkins
• Related gist: https://github.com/isaacarnault/terraform-jenkins/tree/master

Gist writing, testing and debugging : 20 hrs

This gist is part of my Cloud series and is performed on a Linux OS.
It focuses on Terraform and Infrastructure as Code (IaC).
Make sure to get familiar with Terraform before you take this gist. You have two ways to deploy Terraform: either on your local machine, either in a remote virtual machine hosted on a 'Cloud' platform such as AWS.

Throughout this gist, we will be using Terraform installed on our local machine.

We will learn how to deploy a Terraform infrastructure integrating with Jenkins and Ansible.

| Some useful resources
. https://www.terraform.io/docs/cloud/index.html
. https://www.terraform.io/docs/cloud/paid.html


Important The following gist was performed on `Terraform` v.0.13.3.
If you use older versions, you may encounter interpolations warnings upon commands execution.
These warnings shouldn't affect the infrastructure building.

For easy use of this gist:

  1. Open your Shell (ctrl + Alt + T)
  2. Clone this repository on your local machine where you want, could be on your Desktop:
$ cd Desktop
$ git clone https://gist.github.com/isaacarnault/6020ed7a7b177ad8c1ab9a285191669a
}
  1. From the command line, go to the folder where the repository is hosted:

  2. Perform the below commands.

$ terraform init
}
🔵 See output

isaac-arnault-terraform-1.png

$ terraform plan
}
🔵 See output

isaac-arnault-aws-2.png

$ terraform apply -auto-approve
}
🔵 See output

isaac-arnault-terraform4.png


Conclusion In this gist we've got a practical usage of Terraform for deploying a VPC on AWS.
We've learned how to use Terraform with Atom editor for deploying the needed resources. We've also learned how to integrate Jenkins with Terraform to automate this deployment. This other repository that I've uploaded on GitHub contains all files ready for deployment:

Related tags

• AWS
• AWS Console
• Cloud computing
• Terraform
• Jenkins
• Ansible

About

AWS VPC using Terraform and Jenkins integration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%