Giter Site home page Giter Site logo

terraform-modules's Introduction

Webserver Deployment Using Terraform Module

Here is a step-by-step approach to using Terraform Modules to Deploy multiple web servers running on aws_ec2_instances. A similar system could be used to deploy other cloud resources.

High-Level Steps

  1. Create a new directory for your Terraform project and create a main.tf file.

  2. Create a new directory named modules in your project directory, and inside it, create a folder named ec2_instance

  3. Create the following files inside the modules/ec2_instance directory.

  4. Edit modules/ec2_instance/variable.tf to define input variables for the module.

  5. Edit modules/ec2_instance/main.ft to create the EC2 instances

  6. Edit modules/ec2_instance/output.ft to define the module’s output variables

  7. Edit the main.tf file in your project directory to use the EC2 module

  8. Initialize Terraform

  9. Apply the Terraform configuration

  10. End the session

See attached doc for the complete project and results

terraform-modules's People

Contributors

tekum21 avatar

Stargazers

 avatar

Watchers

 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.