Skip to content

Latest commit

 

History

History
70 lines (59 loc) · 7.82 KB

File metadata and controls

70 lines (59 loc) · 7.82 KB

Requirements

Name Version
terraform >= 1.3
aws >= 4.0

Providers

Name Version
aws 5.83.1

Modules

No modules.

Resources

Name Type
aws_ecs_service.this resource
aws_ecs_task_definition.this resource
aws_ecs_task_definition.this data source

Inputs

Name Description Type Default Required
assign_public_ip Flag for enabling/disabling public IP for ECS Containers bool false no
capacity_provider_strategy The capacity provider strategy to use by ecs service. Can be one or more. list(map(any)) [] no
cluster_id Cluster ID string n/a yes
container_definitions A list of container definitions in JSON format that describe the different containers that make up your task string n/a yes
deployment_circuit_breaker Configuration block for deployment circuit breaker any {} no
deployment_controller_type Type of deployment controller. Valid values are CODE_DEPLOY and ECS string "ECS" no
deployment_maximum_percent Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy. number 200 no
deployment_minimum_healthy_percent Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment. number 100 no
desired_count Number of instances of the task definition to place and keep running. number 0 no
docker_volumes Task docker volume definitions as list of configuration objects. You cannot define both Docker volumes and EFS volumes on the same task definition. list(any) [] no
ecs_load_balancers Configuration block for load balancers. list(any) [] no
efs_volumes Task EFS volume definitions as list of configuration objects. You cannot define both Docker volumes and EFS volumes on the same task definition. list(any) [] no
enable_ecs_managed_tags Specifies whether to enable Amazon ECS managed tags for the tasks within the service bool true no
enable_execute_command Specifies whether to enable Amazon ECS Exec for the tasks within the service bool false no
execution_role_arn ECS excution role arn string "" no
health_check_grace_period_seconds Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers number null no
launch_type Launch type string "EC2" no
name The Service name string n/a yes
network_mode Networking Mode Type string "awsvpc" no
ordered_placement_strategy Service level strategy rules that are taken into consideration during task placement.
list(object({
type = string
field = string
}))
[] no
platform_version Platform version (applicable for FARGATE launch type) string "LATEST" no
propagate_tags Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION string "TASK_DEFINITION" no
security_groups Security group IDs to attach to your ECS Service list(string) null no
service_placement_constraints The rules that are taken into consideration during task placement. Maximum number of placement_constraints is 10.
list(object({
type = string
expression = string
}))
[] no
service_registries Service discovery registries for the service. The maximum number of service_registries blocks is 1 list(any) [] no
subnets Private subnets for ECS list(string) null no
tags Tags for ECS cluster map(string) {} no
task_cpu Number of cpu units used by the task. If the requires_compatibilities is FARGATE this field is required. number 256 no
task_memory Amount (in MiB) of memory used by the task. If the requires_compatibilities is FARGATE this field is required. number 512 no
task_placement_constraints The rules that are taken into consideration during task placement. Maximum number of placement_constraints is 10
list(object({
type = string
expression = string
}))
[] no
task_role_arn Task role arn string "" no

Outputs

Name Description
aws_ecs_task_definition ARN of the ECS service
ecs_service_arn ARN of the ECS service
ecs_service_name The name of the ECS service