Coder Social home page Coder Social logo

terraform-aws-exercise's Introduction

Bright-task

Infrastructure deployment automation script(s) using Terraform on the AWS platform. This configuration includes:

  1. An Application Load Balancer (ALB) with a target group and listener. (loadbalancer.tf)
  2. An EC2 instance running the Apache HTTP server on Ubuntu 22.04 (web-server-vm.tf)

This part is not finished

  1. An RDS instance with a MySQL database. (db.tf) I was not sure on how show easily database connection from web-server

Next step would be to figure it out, propably implementing mysql client in the webserver (updating vm-configuration.tpl - commented code)

  1. An Amazon SQS queue for messaging. (sqs.tf)
  2. An IAM role and policy for the EC2 instance to send logs to Amazon CloudWatch and send messages to the SQS queue.

Prerequisites:

Terraform installed on your machine. Download it from terraform.io and follow the installation instructions for your operating system.

AWS CLI installed and configured. Download it from aws.amazon.com/cli and follow the installation instructions for your operating system.

AWS account with necessary permissions.

Steps to run the code:

  1. Clone the repository
  2. Complete AWS CLI configuration
  3. Run below commands

Initialize Terraform In your local repository, run the following command:

terraform init

Validate the configuration Run the following command to check your configuration for syntax errors:

terraform validate

Review the execution plan Run the following command to see what changes Terraform will make to your infrastructure:

terraform plan -var-file aws.tfvars

Apply the changes If you're satisfied with the execution plan, run the following command to apply the changes:

terraform apply -var-file aws.tfvars -auto-approve

  1. Verify connection by entering url from output load_balancer_dns

terraform-aws-exercise's People

Contributors

110kc3 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.