Skip to content

Cloud Infrastructure built with HashiCorp Terraform to deploy multiple ec2 instances on Amazon Web Services.

License

Notifications You must be signed in to change notification settings

etoromol/aws-multi-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-multi-node

Terraform enables you to safely and predictably create, change and improve infrastructures. This allows a blueprint of your datacenter to be versioned and treated as you would any other code. Additionally, infrastuctures can be shared and re-used.

This project is a custom infrastructure built with Terraform Language (HCL) to deploy an Amazon Linux 2 server to act as a bastion-server, one CSR1000v running IOS XE 17.3.3 and our newest release, a Catalyst 8000v running IOS XE 17.4.1b. Besides you will have a pool of ec2 instances of common interest that you can customize and deploy based on your needs.

Prerequisites

To deploy this infrastructure you will need:

Installation

  1. Download a copy of the infrastructure to your local device:
git clone https://github.com/etoromol/aws-multi-node.git
cd aws-multi-node
  1. Initialize the working directory containing Terraform configuration files:
terraform init

Configuration

  1. Setup the AWS CLI from your terminal. Follow the prompts to input your AWS Access Key ID and Secret Access Key:
aws configure

The configuration process stores your credentials in a file at ~/.aws/credentials on MacOS and Linux, or %UserProfile%.aws\credentials on Windows.

  1. Go to variable.tf file and customize your project's name and environment arguments:
variable "project" {
  description = "Name and Environment type of the infrastructure"
  type        = map(string)
  default = {
    "name"        = "aws_sandbox" <-
    "environment" = "d"           <-
  }
}
  1. Go to variable.tf file and define the access_key default argument with the name of your SSH key:
var "access_key" {
  description = "Name of the SSH key selected to access the instances"
  type = string
  default = "" <-
}

Deployment

  1. Once your infrastructure is ready, start with the deployment:
terraform apply
  1. When your instance is ready, access using your ssh key:
ssh -i "path_to_your_ssh_key" ec2-user@public_ip_address_given
  1. Destroy your infrastructure if it is no longer needed:
terraform destroy

The Terraform apply and destroy plans will show to you before initialization. Type yes if you are good, otherwise Terraform will not proceed further.

License

Copyright (c) 2021 Eduardo Toro.

Licensed under the MIT license.

About

Cloud Infrastructure built with HashiCorp Terraform to deploy multiple ec2 instances on Amazon Web Services.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages