assign_public_ip |
Whether to assign a public IP to this service. Defaults to false . |
bool |
false |
no |
autoscaling_metrics |
A map of autoscaling metrics. |
map(object({ metric_type = string target_value = number scale_in_cooldown = number scale_out_cooldown = number })) |
{ "cpu": { "metric_type": "ECSServiceAverageCPUUtilization", "scale_in_cooldown": 300, "scale_out_cooldown": 300, "target_value": 75 }, "memory": { "metric_type": "ECSServiceAverageMemoryUtilization", "scale_in_cooldown": 300, "scale_out_cooldown": 300, "target_value": 75 } } |
no |
cloudwatch_log_group_name |
CloudWatch log group to use with the service. |
string |
null |
no |
cluster_name |
Name of the ECS Cluster to deploy the service into. |
string |
n/a |
yes |
container_port |
Port the container should expose. |
number |
null |
no |
cpu |
CPU limits for container. |
number |
256 |
no |
create_log_group |
Whether to create the CloudWatch log group. Defaults to true . |
bool |
true |
no |
deployment_maximum_percent |
Maximum deployment as a percentage of service_count . Defaults to 200, for zero-downtime deployment. |
number |
200 |
no |
deployment_minimum_healthy_percent |
Minimum healthy percentage for a deployment. Defaults to 100, for zero-downtime deployment. |
number |
100 |
no |
docker_image |
Base docker image to use. |
string |
n/a |
yes |
docker_tag |
Tag of the docker image to use. |
string |
n/a |
yes |
enable_ecs_exec |
Whether to enable ECS Exec for the service. |
bool |
false |
no |
enable_rollback |
Whether to enable circuit breaker rollbacks. Defaults to true . |
bool |
true |
no |
entrypoint |
Entrypoint to be passed to the container. |
list(string) |
null |
no |
execution_role_policy_arns |
A list of additional policy ARNs to attach to the service's execution role. |
list(string) |
[] |
no |
fargate_version |
Fargate platform version to use. Defaults to LATEST . |
string |
"LATEST" |
no |
healthcheck_grace_period |
Number of seconds to wait before starting healthchecks on the service. Defaults to 10 . |
number |
10 |
no |
max_capacity |
A maximum capacity for autoscaling. |
number |
n/a |
yes |
memory |
Memory limits for container. |
number |
512 |
no |
min_capacity |
A minimum capacity for autoscaling. Defaults to 1. |
number |
1 |
no |
network_mode |
Docker networking mode to use. One of awsvpc , bridge , host , or none . |
string |
"awsvpc" |
no |
private_dns_namespace |
Private DNS namespace name. If provided, enables service discovery. |
string |
null |
no |
security_groups |
A list of security group IDs to asssociate with the service. |
list(string) |
null |
no |
service_count |
Number of replicas of the service to create. Defaults to 1. |
number |
1 |
no |
service_environment_config |
Service specific environment config |
list(map(string)) |
[] |
no |
service_name |
Name of the service to create. |
string |
n/a |
yes |
service_secrets_config |
Service specific environment secrets |
list(map(string)) |
[] |
no |
skip_destroy |
Whether to retain the task definition revision when the resource is destroyed or replaced. Defaults to false . |
bool |
false |
no |
subnet_ids |
Subnet IDs to place the service into. |
list(string) |
null |
no |
tags |
A map of tags to apply to all resources in this module. |
map(string) |
{} |
no |
target_group_arn |
ARN of the load balancer target group. |
string |
null |
no |
task_role_policy_arns |
A list of additional policy ARNs to attach to the service's task role. |
list(string) |
[] |
no |
timeout |
Timeout time for the ECS service to become stable before producing a Terraform error. |
string |
"15m" |
no |
use_autoscaling |
Whether to use autoscaling for the service. Defaults to false . |
bool |
true |
no |
use_fargate |
Whether to use Fargate to launch tasks. Disable to use EC2-backed ECS. |
bool |
true |
no |
wait_for_steady_state |
Whether to wait for the service to become stable akin to aws ecs wait services-stable . Defaults to true. |
bool |
true |
no |