ecs-service

bryan-rhm/ecs-service/aws

Terraform Module HCL AWS

Terraform module for ECS Service

Install
module "ecs-service" {
source = "bryan-rhm/ecs-service/aws"
version = "2.0.0"
}
plain text: /constructs/tfmod-bryan-rhm-ecs-service-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform AWS ECS Service Module This terraform module provisions an ECS service. Usage Example on how to provision an AWS ECS Service with FARGATE SPOT containers. ``hcl module "ecs_service" { source = "bryan-rhm/ecs-service/aws" version = "..." # select your prefered version name = "service-name" cluster_arn = module.ecs_cluster.output.arn task_definition_arn = module.ecs_task_definition.output.arn desired_count = 2 propagate_tags = "TASK_DEFINITION" launch_type = "FARGATE" deployment_maximum_percent = 200 deployment_minimum_percent = 100 network_config = { subnets = module.vpc.output.private_subnet_ids security_groups = ["sg-id-1234"] } capacity_provider_strategy = [{ base = 2 name = "FARGATE_SPOT" weight = 1 }] load_balancer = { target_group_arn = module.alb_target_group.output.arn con

Inputs (15)
NameTypeDescriptionDefault
namestringName to give to the ECS Service. required
task_definition_arnstringFamily and revision (family:revision) or full ARN of the task definition to be rnull
launch_typestringLaunch type on which to run your service. The valid values are EC2, FARGATE, and"FARGATE"
load_balancerobject({ target_group_arn Details of the load balancer to be associated to the service.null
tagsmap(any)A map of tags to assign to the target group. If configured with a provider defaunull
cluster_arnstringARN of the ECS cluster on which to run the service. If a cluster is not specifienull
deployment_maximum_percentnumber(Optional) Upper limit (as a percentage of the service's desiredCount) of the nu200
deployment_minimum_percentnumber(Optional) Lower limit (as a percentage of the service's desiredCount) of the nu100
network_configobject({ subnets Network configuration for the service.null
health_check_grace_periodnumberSeconds to ignore failing load balancer health checks on newly instantiated task10
service_registryobject({ arn = The details of the service discovery registry to associate with this service.null
capacity_provider_strategylist(object({ base = num(Optional) Capacity provider strategies to use for the service. Can be one or mo[]
desired_countnumberNumber of instances of the task definition to place and keep running.0
propagate_tagsstringSpecifies whether to propagate the tags from the task definition or the service "TASK_DEFINITION"
enable_execute_commandbool(Optional) Specifies whether to enable Amazon ECS Exec for the tasks within the true
Outputs (1)
output — ECS service attributes
Resources (1)
aws_ecs_service
Details
FrameworkTerraform Module
LanguageHCL
Version2.0.0
Cloud AWS
★ Stars2
Forks0
Total downloads3.8k
Inputs15
Outputs1
Resources1
LicenseApache-2.0
Namespacebryan-rhm
Updated