capacity_provider_strategy |
(Optional) The capacity_provider_strategy configuration block. This is a list of maps, where each map should contain "capacity_provider ", "weight" and "base" |
list(any) |
[] |
no |
cluster_id |
The Amazon Resource Name (ARN) that identifies the cluster. |
string |
n/a |
yes |
container_name |
Optional name for the container to be used instead of name_prefix. |
string |
"" |
no |
create_repository_credentials_iam_policy |
Set to true if you are specifying repository_credentials variable, it will attach IAM policy with necessary permissions to task role. |
bool |
false |
no |
deployment_controller_type |
Type of deployment controller. Valid values: CODE_DEPLOY, ECS. |
string |
"ECS" |
no |
deployment_maximum_percent |
The upper limit of the number of running tasks that can be running in a service during a deployment |
number |
200 |
no |
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 |
number |
50 |
no |
deregistration_delay |
(Optional) The amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds. The default value is 300 seconds |
number |
60 |
no |
desired_count |
The number of instances of the task definitions to place and keep running. |
number |
1 |
no |
force_new_deployment |
Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version. |
bool |
false |
no |
health_check |
A health block containing health check settings for the target group. Overrides the defaults. |
map(string) |
n/a |
yes |
health_check_grace_period_seconds |
Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers. |
number |
60 |
no |
kms_key_arn |
kms key to decrypt ssm |
string |
n/a |
yes |
lb_arn |
Arn for the LB for which the service should be attach to. |
string |
n/a |
yes |
load_balanced |
Whether the task should be loadbalanced. |
bool |
true |
no |
log_retention_in_days |
Number of days the logs will be retained in CloudWatch. |
number |
30 |
no |
logs_kms_key |
The KMS key ARN to use to encrypt container logs. |
string |
"" |
no |
name_prefix |
A prefix used for naming resources. |
string |
n/a |
yes |
placement_constraints |
(Optional) A set of placement constraints rules that are taken into consideration during task placement. Maximum number of placement_constraints is 10. This is a list of maps, where each map should contain "type" and "expression" |
list(any) |
[] |
no |
platform_version |
The platform version on which to run your service. Only applicable for launch_type set to FARGATE. |
string |
"LATEST" |
no |
private_subnet_ids |
A list of private subnets inside the VPC |
list(string) |
n/a |
yes |
propogate_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 |
proxy_configuration |
(Optional) The proxy configuration details for the App Mesh proxy. This is a list of maps, where each map should contain "container_name", "properties" and "type" |
list(any) |
[] |
no |
repository_credentials |
name or ARN of a secrets manager secret (arn:aws:secretsmanager:region:aws_account_id:secret:secret_name) |
string |
"" |
no |
repository_credentials_kms_key |
key id, key ARN, alias name or alias ARN of the key that encrypted the repository credentials |
string |
"alias/aws/secretsmanager" |
no |
service_name |
ecs service name |
string |
n/a |
yes |
service_registry_arn |
ARN of aws_service_discovery_service resource |
string |
"" |
no |
sg_name_prefix |
A prefix used for Security group name. |
string |
"" |
no |
ssm_allowed_parameters |
path allowed for parameters |
string |
n/a |
yes |
tags |
A map of tags (key-value pairs) passed to resources. |
map(string) |
{} |
no |
target_group_name |
The name for the tasks target group |
string |
"" |
no |
task_container_assign_public_ip |
Assigned public IP to the container. |
bool |
false |
no |
task_container_command |
The command that is passed to the container. |
list(string) |
[] |
no |
task_container_cpu |
Amount of CPU to reserve for the container. |
number |
null |
no |
task_container_environment |
The environment variables to pass to a container. |
map(string) |
{} |
no |
task_container_image |
The image used to start a container. |
string |
n/a |
yes |
task_container_memory |
The hard limit (in MiB) of memory for the container. |
number |
null |
no |
task_container_memory_reservation |
The soft limit (in MiB) of memory to reserve for the container. |
number |
null |
no |
task_container_port |
The port number on the container that is bound to the user-specified or automatically assigned host port |
number |
n/a |
yes |
task_container_protocol |
Protocol that the container exposes. |
string |
"HTTP" |
no |
task_container_secrets |
The secrets variables to pass to a container. |
list(map(string)) |
null |
no |
task_container_working_directory |
The working directory to run commands inside the container. |
string |
"" |
no |
task_definition_cpu |
Amount of CPU to reserve for the task. |
number |
256 |
no |
task_definition_memory |
The soft limit (in MiB) of memory to reserve for the task. |
number |
512 |
no |
task_health_check |
An optional healthcheck definition for the task |
object({ command = list(string), interval = number, timeout = number, retries = number, startPeriod = number }) |
null |
no |
task_host_port |
The port number on the container instance to reserve for your container. |
number |
0 |
no |
task_mount_points |
The mount points for data volumes in your container. Each object inside the list requires "sourceVolume", "containerPath" and "readOnly". For more information see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html |
list(object({ sourceVolume = string, containerPath = string, readOnly = bool })) |
null |
no |
task_start_timeout |
Time duration (in seconds) to wait before giving up on resolving dependencies for a container. If this parameter is not specified, the default value of 3 minutes is used (fargate). |
number |
null |
no |
task_stop_timeout |
Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. The max stop timeout value is 120 seconds and if the parameter is not specified, the default value of 30 seconds is used. |
number |
null |
no |
volume |
(Optional) A set of volume blocks that containers in your task may use. This is a list of maps, where each map should contain "name", "host_path", "docker_volume_configuration" and "efs_volume_configuration". Full set of options can be found at https://www.terraform.io/docs/providers/aws/r/ecs_task_definition.html |
list |
[] |
no |
vpc_id |
The VPC ID. |
string |
n/a |
yes |
wait_for_steady_state |
If true, Terraform will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. |
bool |
false |
no |