Resource Creation Controls
Determines whether resources will be created (affects all resources). Default:
true.Determines whether the ECS service resource will be created. Set to
false to create only the task definition. Default: true.Determines whether to create a task definition or use an existing one. Default:
true.Determines whether the ECS service IAM role should be created (for load balancer management). Default:
true.Create a service-level task execution IAM role. Default:
true.Create the task execution IAM policy with ECR, CloudWatch, Secrets Manager, and SSM permissions. Default:
true.Create the tasks runtime IAM role. Default:
true.Create a security group for the service. Default:
true.Create the infrastructure IAM role. Default:
true.Service
Name of the service (up to 255 letters, numbers, hyphens, and underscores). Default:
"".ARN of the ECS cluster where the service will be provisioned. Default:
"".Launch type for the service:
EC2, FARGATE, or EXTERNAL. Default: "FARGATE".Scheduling strategy:
REPLICA or DAEMON. Default: null (REPLICA).Number of task instances to run. Note: this value is always ignored after initial creation — autoscaling manages the count. Default:
1.Whether changes to task definition, and load_balancer should be ignored. Set to
true for CodeDeploy blue/green deployments.Default: false.Enable ECS automatic task rebalancing across AZs:
ENABLED or DISABLED. Default: null.Enable Amazon ECS managed tags for tasks. Default:
true.Enable Amazon ECS Exec for interactive debugging. Default:
false.Enable fault injection requests from task containers. Default:
null.Force a new task deployment. Default:
true.Delete service even if not scaled to zero (REPLICA strategy only). Default:
null.Seconds to ignore failing load balancer health checks on new tasks. Default:
null.Propagate tags from
SERVICE or TASK_DEFINITION. Default: null.Wait for the service to reach steady state before completing. Default:
null.Enable graceful termination using SIGINT signals (requires
wait_for_steady_state = true). Default: null.Map of values that trigger in-place redeployments when changed. Useful with
timestamp(). Default: null.Create, update, and delete timeout configurations.Default:
null.Additional tags for the service. Default:
{}.Deployment
Deployment controller type.Default:
null.Deployment circuit breaker configuration.Default:
null.Advanced deployment configuration (rolling, canary, linear strategies).Default:
null.Upper limit of running tasks during deployment (as % of desired count). Default:
200.Lower limit of healthy tasks during deployment (as % of desired count). Default:
66.CloudWatch alarms configuration for deployment monitoring.Default:
null.Capacity provider strategy overrides for the service.Default:
null.Task placement constraints (up to 10). Default:
null.Ordered task placement strategies. Default:
null.Load Balancer
Load balancer configuration.Default:
null.VPC Lattice
VPC Lattice configuration for cross-account service connectivity.Default:
null.Service Connect
ECS Service Connect configuration for service discovery.Default:
null.Service discovery registries (Cloud Map).Default:
null.Task Definition
CPU units for the task (required for FARGATE). Default:
1024.Memory in MiB for the task (required for FARGATE). Default:
2048.Unique name for the task definition family. Default:
null (uses service name).Docker networking mode:
none, bridge, awsvpc, or host. Default: "awsvpc".Launch types required:
EC2, FARGATE, EXTERNAL, MANAGED_INSTANCES. Default: ["FARGATE"].CPU architecture and OS family.
Existing task definition ARN. Required when
create_task_definition = false. Default: null.Task-level placement constraints (up to 10). Default:
null.Track the latest ACTIVE task definition revision on AWS. Default:
true.Don’t delete the task definition when the service is deleted. Default:
null.IPC namespace:
host, task, or none. Default: null.PID namespace:
host or task. Default: null.App Mesh proxy configuration. Default:
null.Additional ephemeral storage beyond default (Fargate only).Default:
null.Volume configurations for the task (EFS, Docker, FSx, host bind mounts). Default:
null.EBS volume configuration for volumes attached at launch time. Default:
null.Additional tags for the task definition/set. Default:
{}.Container Definitions
Map of container definitions. Each key is the container name. Supports all ECS container definition parameters.Key module-specific additions:
enable_cloudwatch_logging(bool) — creates a CloudWatch log group. Default:truecloudwatch_log_group_name— custom log group namecloudwatch_log_group_retention_in_days— log retention dayscreate_cloudwatch_log_group— whether the module manages the log group
{}.Task Set
External ID associated with the task set. Default:
null.Desired percentage of tasks to run in the task set (always ignored after creation). Default:
null.Wait until the task set reaches
STEADY_STATE. Default: null.Autoscaling
Enable autoscaling for the service. Default:
true.Minimum number of tasks. Default:
1.Maximum number of tasks. Default:
10.Map of autoscaling policies. Supports
TargetTrackingScaling and StepScaling policy types. Default includes CPU and Memory target tracking policies.Map of scheduled scaling actions.Default:
null.Suspend scaling activities.Default:
null.Networking
Subnets to associate with the task or service. Default:
[].Assign a public IP to the task ENI (Fargate only). Default:
false.Additional security groups to associate with the task. Default:
[].Security group name. Default:
null.Use security group name as prefix. Default:
true.Security group description. Default:
null.Ingress rules for the service security group. Default:
{}.Egress rules for the service security group. Default:
{}.Additional security group tags. Default:
{}.VPC ID for the service. Derived from subnets if not provided. Default:
null.IAM — Service Role
Existing service IAM role ARN. Default:
null.Service IAM role name. Default:
null.Use role name as prefix. Default:
true.IAM role path. Default:
null.Role description. Default:
null.Permissions boundary ARN. Default:
null.Custom IAM statements for the service role. Default:
null.Additional tags. Default:
{}.IAM — Task Execution Role
Existing task execution IAM role ARN. Default:
null.Task execution IAM role name. Default:
null.Use name as prefix. Default:
true.IAM role path. Default:
null.Role description. Default:
null.Permissions boundary ARN. Default:
null.Policy ARNs to attach. Default:
{}.Additional tags. Default:
{}.Maximum session duration in seconds. Default:
null.Path for the task execution IAM policy. Default:
null.Secrets Manager ARNs the execution role can read. Default:
[].SSM parameter ARNs the execution role can read. Default:
[].Custom IAM statements for the execution role. Default:
null.IAM — Tasks Role (Runtime)
Existing tasks IAM role ARN. Default:
null.Tasks IAM role name. Default:
null.Use name as prefix. Default:
true.IAM role path. Default:
null.Role description. Default:
null.Permissions boundary ARN. Default:
null.Additional policy ARNs to attach. Default:
{}.Custom IAM statements for the tasks role. Default:
null.Additional tags. Default:
{}.Maximum session duration in seconds. Default:
null.IAM — Infrastructure Role
Create the infrastructure IAM role. Default:
true.Existing infrastructure IAM role ARN. Default:
null.Infrastructure IAM role name. Default:
null.Use name as prefix. Default:
true.IAM role path. Default:
null.Role description. Default:
null.Permissions boundary ARN. Default:
null.Additional tags. Default:
{}.Misc
AWS region. Defaults to provider region. Default:
null.Tags for all resources. Default:
{}.Deprecated — will be removed in v8.0. Disables v7.0 name/description postfixes. Default:
false.
