GithubHelp home page GithubHelp logo

terraform_demo's Introduction

Terraform Demo

Author: Rafael Nize github: rafaelnize

This document README.md follows the intructions sent by e-mail.


Getting Started

These instructions will get you a copy of the the project up and running on your local machine and AWS account. This software is for testing purposes. Its use on production is discouraged.


Prerequisites

Terraform awscli AWS account

Make sure you have the awscli installed properly on you bastion host or workstation

If you don't have any aws credentials at ~/.aws/credentials you can create one using:

aws configure

Keep credentials outside the source tree!!!

Make sure the current time and date in your workstation is correct otherwise, aws cli won't work properly.


Install Terraform

To install terraform, follow instructions at: https://www.terraform.io/intro/getting-started/install.html

Make sure terraform binary is in your OS Path environment variable !


Check installation

execute the following command to make sure terraform runs fine:

terraform version

If it success you'll see Terraform's version.


Code tree - master branch

├── fargate │   ├── exec_create_fargate.sh │   ├── file.out │   ├── main.tf │   ├── terraform.tf │   ├── terraform.tfstate │   └── terraform.tfstate.backup ├── modules │   ├── fargate │   │   ├── interface.tf │   │   └── main.tf │   ├── static_website │   │   ├── deployer_policy.json │   │   ├── interface.tf │   │   ├── main.tf │   │   └── s3_bucket_policy.json │   └── vpc │   ├── interface.tf │   └── main.tf ├── README.md ├── static_website │   ├── 404.html │   ├── create_static_website.sh │   ├── file.out │   ├── index.html │   ├── main.tf │   ├── terraform.tf │   ├── terraform.tfstate │   └── terraform.tfstate.backup ├── vpc │   ├── exec_create_vpc.sh │   ├── file.out │   ├── main.tf │   ├── terraform.tfstate │   ├── terraform.tfstate.backup │   └── variables.tf └── workspace.code-workspace


Running the tests

There are three directories, one for each test. To execute terraform test you need to CD into them.

--> vpc

exec_create_vpc.sh --> shell script to create the VPC required by the test

static_website

exec_create_static_website.sh  --> shell script to create the example static website on AWS S3

Results: if everything is right, you should see the output for cloudfront endpoint ie:

 cdn_domain_name = d1m3j4dtfb09ti.cloudfront.net

fargate

exec_create_fargate.sh --> shell script to bootstrap ECS Fargate with a nginx sample container

Results: if everything is fine, you'll get the cluster endpoint for that task. ie:

| Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
|
| Outputs:
|
| ecs_service_endpoint = ecs-alb-346685991.us-east-1.elb.amazonaws.com

Branch "etapa2"

That branch has the changes proposed by "etapa2"

Those shell scripts have to be executed again to changes take effect.

Any question, please contact me by e-mail.

Thanks.

terraform_demo's People

Contributors

spitzmann 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.