Skip to content

This repository contains modules for deploying infrastructure to AWS

Notifications You must be signed in to change notification settings

salehparsa/terraform-modules-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Terraform Module

Terraform module which creates cluster solution on AWS.

Following resources are supported in this module:

Pre-requisites

This templated tested with Terraform v0.11.11 and provider.aws v1.54.0.

Configure AWS Access Key

Technically, Terraform can read AWS Access Key from env file. Thus, you can configure AWS Access Key with AWS CLI:

aws configure

Configure your AWS access keys as environment variables:

export AWS_ACCESS_KEY_ID=(your access key id)
export AWS_SECRET_ACCESS_KEY=(your secret access key)

Usage

By cloning this repository:

module "cluster_application" {
  source = "(Path to Your Module)/modules/cluster_application"

  cluster_name           = "cluster-staging"
  db_remote_state_bucket = "${var.db_remote_state_bucket}"
  db_remote_state_key    = "${var.db_remote_state_key}"

  instance_type = "t2.micro"
  min_size      = 1
  max_size      = 2
}

By using the released version:

module "cluster_application" {
  source = "git@github.com:salehparsa/terraform-modules-aws.git"
  version = "1.0.0"

  cluster_name           = "cluster-staging"
  db_remote_state_bucket = "${var.db_remote_state_bucket}"
  db_remote_state_key    = "${var.db_remote_state_key}"

  instance_type = "t2.micro"
  min_size      = 1
  max_size      = 2
}