| Name | Version |
|---|---|
| terraform | ~> 1.5 |
| aws | ~> 5.0 |
| Name | Version |
|---|---|
| aws | 5.100.0 |
| Name | Source | Version |
|---|---|---|
| ecs_service | terraform.registry.launch.nttdata.com/module_primitive/ecs_service/aws | ~> 0.1 |
| ecs_encryption_key | terraform.registry.launch.nttdata.com/module_primitive/kms_key/aws | ~> 0.6 |
| kms_alias | terraform.registry.launch.nttdata.com/module_primitive/kms_alias/aws | ~> 0.1 |
| cloudwatch_log_group | terraform.registry.launch.nttdata.com/module_primitive/cloudwatch_log_group/aws | ~> 1.0 |
| Name | Type |
|---|---|
| aws_ecs_cluster.this | data source |
| aws_ecs_task_definition.this | data source |
| aws_lb_target_group.main | data source |
| aws_security_group.this | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| name | Name for the ECS service | string |
n/a | yes |
| region | AWS region for the provider | string |
"us-east-2" |
no |
| cluster | ARN of the ECS cluster where this service will be placed | string |
null |
no |
| cluster_name | Name of the ECS cluster where this service will be placed (used if cluster ARN is not provided) | string |
null |
no |
| task_definition | The family and revision (family:revision) or full ARN of the task definition to run in your service | string |
null |
no |
| task_definition_family | The family name of the task definition to look up if task_definition is not provided | string |
null |
no |
| desired_count | The number of instances of the task definition to place and keep running | number |
1 |
no |
| launch_type | The launch type on which to run your service. Valid values: EC2, FARGATE, EXTERNAL | string |
"FARGATE" |
no |
| platform_version | The platform version on which to run your service. Only applicable for launch_type set to FARGATE | string |
"LATEST" |
no |
| iam_role | The ARN of an IAM role that allows your Amazon ECS service to make calls to other AWS services | string |
null |
no |
| enable_execute_command | Whether to enable Amazon ECS Exec for the tasks in the service | bool |
false |
no |
| enable_ecs_managed_tags | Whether to enable Amazon ECS managed tags for the tasks in the service | bool |
false |
no |
| propagate_tags | Whether to propagate the tags from the task definition or the service to the tasks | string |
"SERVICE" |
no |
| health_check_grace_period_seconds | Health check grace period in seconds for the service when using load balancers | number |
null |
no |
| wait_for_steady_state | Whether to wait for the service to reach a steady state before continuing | bool |
false |
no |
| force_new_deployment | Whether to force a new task deployment of the service | bool |
false |
no |
| network_configuration | Network configuration for the ECS service | object({ |
null |
no |
| subnets | List of subnet IDs to use for the ECS service (used when network_configuration is null) | list(string) |
null |
no |
| assign_public_ip | Whether to assign public IP to the tasks (used when network_configuration is null) | bool |
null |
no |
| security_group_id | ID of the security group to use for the ECS service (used when network_configuration is null) | string |
null |
no |
| security_group_name | Name of the security group to look up if security_group_id is not provided (used when network_configuration is null) | string |
null |
no |
| load_balancer | Load balancer configuration for the service | list(object({ |
null |
no |
| load_balancer_target_group_name | Name of the target group to look up for load balancer when load_balancer is not provided | string |
null |
no |
| load_balancer_container_name | Container name for load balancer when load_balancer is not provided | string |
null |
no |
| load_balancer_container_port | Container port for load balancer when load_balancer is not provided | number |
null |
no |
| enable_load_balancer | Whether to attach a load balancer to the ECS service | bool |
false |
no |
| service_connect_configuration | Service Connect configuration for the service | object({ |
null |
no |
| service_registries | Service discovery registries for the service | list(object({ |
[] |
no |
| capacity_provider_strategy | Capacity provider strategy to use for the service | list(object({ |
[] |
no |
| deployment_configuration | Deployment configuration for the service | object({ |
{ |
no |
| placement_constraints | Placement constraints for the service | list(object({ |
[] |
no |
| ordered_placement_strategy | Placement strategy for the service | list(object({ |
[] |
no |
| volume_configuration | Configuration for EBS volumes that are attached to tasks | object({ |
null |
no |
| tags | A map of tags to add to the ECS service | map(string) |
{} |
no |
| cloudwatch_logs_region | Region for CloudWatch logs | string |
null |
no |
| service_connect_log_group_name | (Optional, Forces new resource) The name of the log group. If omitted, Terraform will assign a random, unique name. | string |
null |
no |
| service_connect_log_group_skip_destroy | (Optional) Set to true if you do not wish the log group (and any logs it may contain) to be deleted at destroy time, and instead just remove the log group from the Terraform state. | bool |
false |
no |
| service_connect_log_group_retention_days | (Optional) Specifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1096, 1827, 2192, 2557, 2922, 3288, 3653, and 0. If you select 0, the events in the log group are always retained and never expire. | number |
30 |
no |
| service_connect_log_group_tags | A map of tags to add to the resources created by the module. | map(string) |
{} |
no |
| enable_kms_encryption | Whether to create a KMS key for encryption | bool |
true |
no |
| kms_key_description | Description for the KMS key | string |
"KMS key for ECS service encryption" |
no |
| kms_key_alias_suffix | Suffix for the KMS key alias name | string |
"-ecs-encryption" |
no |
| kms_key_usage | Intended use of the key | string |
"ENCRYPT_DECRYPT" |
no |
| kms_key_is_enabled | Whether the key is enabled | bool |
true |
no |
| kms_key_enable_key_rotation | Whether to enable key rotation | bool |
true |
no |
| Name | Description |
|---|---|
| id | The ID of the ECS service |
| name | The name of the ECS service |
| cluster | The cluster the ECS service is associated with |
| desired_count | The desired number of tasks for the ECS service |
| task_definition | The task definition ARN used by the ECS service |
| launch_type | The launch type of the ECS service |
| platform_version | The platform version of the ECS service |
| deployment_configuration | The deployment configuration of the ECS service |
| network_configuration | The network configuration of the ECS service |
| load_balancer_configuration | The load balancer configuration of the ECS service |
| service_connect_configuration | The service connect configuration of the ECS service |
| service_registries | The effective service registries configuration of the ECS service (includes Service Connect registry if configured) |
| service_connect_service_arn | ARN of the Service Connect service discovered via data source (if lookup is configured) |
| service_connect_service_discovery_name | Discovery name of the Service Connect service (from configuration) |
| capacity_provider_strategy | The capacity provider strategy of the ECS service |
| placement_constraints | The placement constraints of the ECS service |
| placement_strategy | The placement strategy of the ECS service |
| volume_configuration | The volume configuration of the ECS service |
| enable_execute_command | Whether ECS Exec is enabled for the service |
| enable_ecs_managed_tags | Whether ECS managed tags are enabled for the service |
| propagate_tags | How tags are propagated to tasks |
| tags | A map of tags assigned to the ECS service |
| tags_all | A map of tags assigned to the resource, including provider default_tags |
| service_details | Comprehensive details about the ECS service for integration purposes |
| service_configuration | Summary of the ECS service configuration |
| service_connect_log_group_name | n/a |
| service_connect_log_group_arn | n/a |
| ecs_encryption_key_arn | ARN of the KMS key created for ECS encryption (if enabled) |
| service_id | The ID of the ECS service |
| service_name | The name of the ECS service |
| cluster_arn | The cluster the ECS service is associated with |
| service_tags | A map of tags assigned to the ECS service |