Code Monkey home page Code Monkey logo

terraform-aws-ecs-fargate's Introduction

Terraform AWS ECS Fargate Module

The module is developed to quickly implement fargate cluster for appmesh microservices or virtual gateway. Following are the features

Features

  • Appmesh
  • Cloudmap service
  • Virtual Gateway envoy proxy with a load balancer
  • Sidecars supported:
    • envoy proxy
    • aws xray
  • Secret Manager
  • Parameter Store
  • Elastic container registry (ECR)
  • Auto Scaling
  • Cloudwatch Dashboard
  • SSL cert on LB
  • Cloudwatch Dashboard

Example

Following example creates fargate cluster for appmesh service

module "test" {
  source            		= "github.com/g31s/ecs-fargate"
  // project variables
  region            		= var.region
  vpc               		= "vpc object"
  env               		= "dev"
  // app variables
  app_name          		= "test"
  app_port          		= "80"
  cloudmap_service  		= "cloudmap service name"
  aws_appmesh_virtual_node 	= "appmesh virtual node name"
  appmesh           		= "appmesh object"
}

More examples: Examples

Input Variables

Variable Required Default Type Info Example
vpc Y - object - module.vpc from terraform vpc module will be one example
region Y - string - "us-east-1"
env Y - string - "dev"
app_name Y - string - "test"
app_port Y - string - "80"
appmesh Y - object - aws_appmesh_mesh.main
cloudmap_service Y - object - aws_service_discovery_private_dns_namespace.main
fargate_cpu N "1024" string - "2048"
fargate_memory N "2048" string - "4096"
prefix N "EFA" string - "AGT"
app_image N "none" string Default will create ECR "nginx:1.13.9-alpine"
min_app_count N 1 number - 1
max_app_count N 10 number - 100
extra_ports N [] list(string) Open extra port in task definition ["443","542"]
secrets N [] list(object) Will add IAM permissions and secrets to task definition [aws_secretsmanager_secret.main.usernamer,aws_secretsmanager_secret.main.password]
parameters N [] list(object) Will add IAM permissions and parameters to task defintion as env variables [aws_ssm_parameter.main.configs]
policy_arn_attachments N [] list(string) can provide addition policies arns to be attached to ecs roles [arn:aws:iam::aws:policy/service-role/AWSLambdaDynamoDBExecutionRole]
aws_appmesh_virtual_node N "none" string virtual node or virtual gateway must be present aws_appmesh_virtual_node.main.name
virtual_gateway N "none" string virtual node or virtual gateway must be present "test_virtual_gateway"
envoy_proxy_image N "840364872350.dkr.ecr.us-east-1.amazonaws.com/aws-appmesh-envoy:v1.22.0.0-prod" string work for all regions except: me-south-1, ap-east-1, and eu-south-1 me-south-1 : "772975370895.dkr.ecr.me-south-1.amazonaws.com/aws-appmesh-envoy:v1.22.0.0-prod"
certificate N false bool make sure to set this to true if providing certificate arn true
certificate_arn N "none" string set certificate on LB aws_acm_certificate.privateCA.arn
nlb_stickiness N false bool enable stickiness for network load balancer true
xray N false bool add xray daemon as sidecar true
tags N {Terraform = "true",Module = "ecs-fargate-appmesh"} map(string) - {name = "test"}

Output Variables

Variable
ecs_cluster_arn
ecs_service_arn
ecr_repo_url
ecr_repo_name
nlb_arn
target_group_arn

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU General Public License v3.0 License - see the LICENSE.md file for details

terraform-aws-ecs-fargate's People

Contributors

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