Code Monkey home page Code Monkey logo

jenkins-terraform-pipeline-10.08's Introduction

alt text

maintained by Core Solutions GitHub tag Terraform Version License

Jenkins Terraform Pipeline Example

The Jenkins pipeline used in this repo defines of various stages used to initialise, plan, approve and apply terraform configurations

This repo is intended to showcase the simplicity of leveraging Jenkins, Terraform & Ansible together and how to best structure an IaC repo with clear demarcation between Infrastructure as Code & Configuration Management.

Jenkins Dependencies

  • Setup with AWS authentication

  • Terraform 12 installed and working

Setup

In order to run this example pipeline yourself you'll first need to fork this repo, then complete the following changes:

  • Update the BACKEND_BUCKET value

  • Update the filters in data.tf to reference values applicable to your AWS environment

  • Create a new Jenkins pipeline using the location of your forked repo

  • Create a DynamoDB table for state locking defined as terraform-state-lock

You can use the Terraform/Setup configuration to create a test S3 backend bucket / Dynamo table if needed, if you'd prefer to use existing infrastructure just update the values in the Jenkinsfile & terraform.tf accordingly

Usage

Running the pipeline will create everything in the Demo directory for the environment specified, it will pause for manual approval before making any changes, this allows you to fully review the tf plan before proceeding.

Input Parameters

Parameter Options Description
Action build or destroy The action to take on the terraform infrastructure
Colour blue or green The leg to take action on

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.