Skip to content

nitinda/terraform-module-aws-ecs-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Module: terraform-module-aws-ecs-service


Code : Stable


General

This module can be used to deploy a ECS Service on AWS Cloud Provider......


Prerequisites

This module needs Terraform 0.12.23 or newer. You can download the latest Terraform version from here.


Features

Below we are able to check the resources that are being created as part of this module call:

  • ECS Service

Usage

Using this repo

To use this module, add the following call to your code:

module "ecs_service" {
  source = "git::https://github.com/nitinda/terraform-module-aws-ecs-service.git?ref=master"

  providers = {
    aws = aws.services
  }

  name            = "ecs-service"
  cluster         = "ecs-cluster"
  task_definition = var.task_definition
 
}

Inputs

The variables required in order for the module to be successfully called from the deployment repository are the following:

Variable Description Type Argument Status
name The name of the service string Required
capacity_provider_strategy The capacity provider
strategy to use for the service
any Optional
(Default - [])
cluster ARN of an ECS cluster string Optional
(Default - null)
deployment_controller Configuration block containing
deployment controller configuration
map(string) Optional
(Default - {})
deployment_maximum_percent The upper limit of the number
of running tasks that can be
running in a service during a deployment
string Optional
(Default - null)
deployment_minimum_healthy_percent The lower limit of the number
of running tasks that must remain running
and healthy in a service during a deployment
string Optional
(Default - null)
desired_count The number of instances of the task
definition to place and keep running
string Optional
(Default - null)
enable_ecs_managed_tags Specifies whether to enable
Amazon ECS managed tags for
the tasks within the service
string Optional
(Default - null)
health_check_grace_period_seconds Seconds to ignore failing load balancer health
checks on newly instantiated tasks to prevent premature shutdown
number Optional
(Default - 0)
iam_role ARN of the IAM role that allows
Amazon ECS to make calls to your
load balancer on your behalf
string Optional
(Default - null)
launch_type The launch type on which to run your service string Optional
(Default - EC2)
load_balancer A load balancer block any Optional
(Default - {})
network_configuration The network configuration for the service any Optional
(Default - {})
ordered_placement_strategy Service level strategy rules that are
taken into consideration during task placement
map(string) Optional
(Default - any)
propagate_tags Specifies whether to propagate the tags from
the task definition or the service to the tasks
string Optional
(Default - null)
scheduling_strategy The service discovery registries for the service string Optional
(Default - REPLICA)
service_registries The platform version on which to run your service map(string) Optional
(Default - {})
tags Key-value mapping of resource tags map(string) Optional
(Default - {})
task_definition The family and revision (family:revision)
or full ARN of the task definition
that you want to run in your service
string Required

Outputs

General

This module has the following outputs:

  • id
  • name
  • cluster

Usage

In order for the variables to be accessed at module level please use the syntax below:

module.<module_name>.<output_variable_name>

The output variable is able to be accessed through terraform state file using the syntax below:

"${data.terraform_remote_state.<layer_name>.<output_variable_name>}"

Authors

Module maintained by Module maintained by the - Nitin Das

Releases

No releases published

Packages

No packages published

Languages