GithubHelp home page GithubHelp logo

terraform's Introduction

Terraform scripts (for AWS)

Terraform scripts using module way. Only AWS Terraform scripts have been set for the moment.

Table of Contents

Requirements

Install the binary

You need to download the Terraform binary and add it in your environment path. You could find the latest binary on the Terraform Download Page.

You can run these commands depending on the version of Terraform e.g. here 0.11.7 for linux in amd64

wget https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip
unzip terraform_0.11.7_linux_amd64.zip -d /usr/bin

Run Terraform

After configurating the following Terraform scripts you can run it with Dry Run mode Dry Run mode

terraform plan

And you can apply the needed modifications to stick to the Terraform configuration Apply modifications

terraform apply

Terraform scripts

Make a sandbox VPC

Go in sandbox/ directory.

Terraform scripts are set to save configuration on a S3 Bucket. Its configuration is standalone and independent from the rest of the scripts.

S3 Backend

Open the main.tf file and edit thebackend "s3" part.

vi main.tf

Change the storage options : bucket, key, profile, region

terraform {
  backend "s3" {
    bucket = "tf-ineat-sandbox"
    key    = "sandbox/terraform.tfstate"
    profile = "default"
    region = "eu-central-1"
  }
}

Variables

The vars.tfcontains global variables to help Terraform to apply the modifications depending on these variables.

Open the vars.tf file and edit the different options.

variable "region" {
  default = "eu-central-1"
}

variable "env" {
  default = "Sandbox"
}

variable "key_name" {
  default = "ineat-default"
}

variable "project" {
  default = "sandbox"
}

variable "instance_type" {
  default = "t2.micro"
}

variable "cidr" {
  default = "192.168.0.0/16"
}

terraform's People

Contributors

germainlefebvre4 avatar

Watchers

James Cloos avatar  avatar

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.