Giter Site home page Giter Site logo

toshilam / terraform-aws-ecs-fargate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grandcolline/terraform-aws-ecs-fargate

0.0 0.0 0.0 42 KB

Minimal ECS Fargate Service Module ๐Ÿ™

License: Do What The F*ck You Want To Public License

HCL 100.00%

terraform-aws-ecs-fargate's Introduction

ECS FARGATE

CircleCI

Description

This is Minimal ECS Fargate Service Module. These types of resources are supported:

Type

Load Balancer

type = lb is create target group and connect to ecs_service.

Private Service Discovery

type = sd is create private service discovery and connect to ecs_service.

Nothing

type = no is not create more resources.

Auto Scalling

is_mem_scale = true or is_cpu_scale = true

Usage

module "fargate" {
  source              = "grandcolline/ecs-fargate/aws"
  version             = "1.0.0"
  service_name        = "FargateTestService"
  cluster_name        = aws_ecs_cluster.main.name
  task_definition_arn = aws_ecs_task_definition.main.arn
  container_name      = "ecs_demo_app"
  assign_public_ip    = "true"
  type                = "lb"
  service_subnets     = ["${var.service_subnet_id}"]
  lb_dns              = aws_alb.main.dns_name
}

Inputs

Common Variables

Name Description Type Default Required
region AWS Region string "ap-northeast-1" no
add_tags Additional tags map(string) {} no

Fargate Variables

Name Description Type Default Required
service_name fargate service name string n/a yes
cluster_name ECS cluster name string n/a yes
task_count task's desired count & minimum capacity string "1" no
task_definition_arn task definition's arn string n/a yes
type fargate service type. load balancer or service discovery or nothing (lb/sd/no) string "no" no
deployment_maximum_percent maximum percent when deploy string "200" no
deployment_minimum_healthy_percent minimum percent when deploy string "50" no
assign_public_ip assign public ip to the task bool "false" no

Network Variables

Name Description Type Default Required
service_subnets List of subnet id's to put the task on list n/a yes

Load Balancer Variables (type = lb)

Name Description Type Default Required
container_name container's name to which target group connect string "" no
container_port container's port to which target group connect string "8080" no
deregistration_delay time for load balancing to wait before deregistering a target string "300" no
lb_dns load balancer's dns string "" no
healthy_threshold string "2" no
unhealthy_threshold string "5" no
healthcheck_timeout string "5" no
healthcheck_protocol string "HTTP" no
healthcheck_path string "/hc" no
healthcheck_interval string "30" no
healthcheck_matcher string "200" no

Service Discovery Variables (type = sd)

Name Description Type Default Required
dns_namespace_id string "" no
dns_ttl string "10" no

Auto Scalling Variables

Name Description Type Default Required
task_max_count task's maximum capacity string "2" no
is_mem_scale scale task by memory usage bool "false" no
mem_target_value target value of scale task by memory usage (%) string "40" no
mem_scale_in_cooldown cool down time of scale in task by memory usage string "300" no
mem_scale_out_cooldown cool down time of scale out task by memory usage string "300" no
is_cpu_scale scale task by cpu usage bool "false" no
cpu_target_value target value of scale task by cpu usage (%) string "40" no
cpu_scale_in_cooldown cool down time of scale in task by cpu usage string "300" no
cpu_scale_out_cooldown cool down time of scale out task by cpu usage string "300" no

Outputs

Name Description
target_group_arn target group's arn
target_group_arn_suffix target group's arn suffix

terraform-aws-ecs-fargate's People

Contributors

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