{"id":51410845,"url":"https://github.com/launchbynttdata/tf-aws-module_primitive-ecs_service","last_synced_at":"2026-07-04T14:32:32.774Z","repository":{"id":326102779,"uuid":"1100723169","full_name":"launchbynttdata/tf-aws-module_primitive-ecs_service","owner":"launchbynttdata","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-14T18:49:07.000Z","size":34,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-14T20:27:49.892Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/launchbynttdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-20T17:02:07.000Z","updated_at":"2026-04-06T14:15:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/launchbynttdata/tf-aws-module_primitive-ecs_service","commit_stats":null,"previous_names":["launchbynttdata/tf-aws-module_primitive-ecs_service"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/launchbynttdata/tf-aws-module_primitive-ecs_service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-ecs_service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-ecs_service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-ecs_service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-ecs_service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/launchbynttdata","download_url":"https://codeload.github.com/launchbynttdata/tf-aws-module_primitive-ecs_service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchbynttdata%2Ftf-aws-module_primitive-ecs_service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35125718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-04T14:32:30.583Z","updated_at":"2026-07-04T14:32:32.767Z","avatar_url":"https://github.com/launchbynttdata.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tf-aws-module_primitive-ecs_service\n\nThis module provides a primitive Terraform module for creating an Amazon ECS service with support for various configurations including load balancers, service discovery, and more.\n\n## Features\n\n- Supports Fargate and EC2 launch types\n- Configurable network settings with subnets and security groups\n- Load balancer integration\n- Service Connect for service-to-service communication\n- Service discovery registries\n- Capacity provider strategies\n- Deployment configurations with circuit breakers and alarms\n- Volume configurations for EBS attachments\n- ECS Exec support\n- Comprehensive tagging and managed tags\n\n## Usage\n\n```hcl\nmodule \"ecs_service\" {\n  source = \"path/to/module\"\n\n  name            = \"my-ecs-service\"\n  cluster         = aws_ecs_cluster.example.arn\n  task_definition = aws_ecs_task_definition.example.arn\n\n  desired_count = 2\n  launch_type   = \"FARGATE\"\n\n  network_configuration = {\n    subnets          = [aws_subnet.example.id]\n    security_groups  = [aws_security_group.example.id]\n    assign_public_ip = false\n  }\n\n  tags = {\n    Environment = \"dev\"\n  }\n}\n```\n\n## Resources Created\n\n- 1 ECS Service\n- 1 Service Discovery Service (data source, if Service Connect lookup is configured)\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | ~\u003e 5.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_ecs_service.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service) | resource |\n| [aws_service_discovery_service.service_connect](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/service_discovery_service) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Name for the ECS service | `string` | n/a | yes |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | A map of tags to add to the ECS service | `map(string)` | `{}` | no |\n| \u003ca name=\"input_cluster\"\u003e\u003c/a\u003e [cluster](#input\\_cluster) | ARN of the ECS cluster where this service will be placed | `string` | n/a | yes |\n| \u003ca name=\"input_task_definition\"\u003e\u003c/a\u003e [task\\_definition](#input\\_task\\_definition) | The family and revision (family:revision) or full ARN of the task definition to run in your service | `string` | n/a | yes |\n| \u003ca name=\"input_desired_count\"\u003e\u003c/a\u003e [desired\\_count](#input\\_desired\\_count) | The number of instances of the task definition to place and keep running | `number` | `1` | no |\n| \u003ca name=\"input_launch_type\"\u003e\u003c/a\u003e [launch\\_type](#input\\_launch\\_type) | The launch type on which to run your service. Valid values: EC2, FARGATE, EXTERNAL | `string` | `\"FARGATE\"` | no |\n| \u003ca name=\"input_platform_version\"\u003e\u003c/a\u003e [platform\\_version](#input\\_platform\\_version) | The platform version on which to run your service. Only applicable for launch\\_type set to FARGATE | `string` | `\"LATEST\"` | no |\n| \u003ca name=\"input_iam_role\"\u003e\u003c/a\u003e [iam\\_role](#input\\_iam\\_role) | The ARN of an IAM role that allows your Amazon ECS service to make calls to other AWS services | `string` | `null` | no |\n| \u003ca name=\"input_enable_execute_command\"\u003e\u003c/a\u003e [enable\\_execute\\_command](#input\\_enable\\_execute\\_command) | Whether to enable Amazon ECS Exec for the tasks in the service | `bool` | `false` | no |\n| \u003ca name=\"input_enable_ecs_managed_tags\"\u003e\u003c/a\u003e [enable\\_ecs\\_managed\\_tags](#input\\_enable\\_ecs\\_managed\\_tags) | Whether to enable Amazon ECS managed tags for the tasks in the service | `bool` | `false` | no |\n| \u003ca name=\"input_propagate_tags\"\u003e\u003c/a\u003e [propagate\\_tags](#input\\_propagate\\_tags) | Whether to propagate the tags from the task definition or the service to the tasks | `string` | `\"SERVICE\"` | no |\n| \u003ca name=\"input_health_check_grace_period_seconds\"\u003e\u003c/a\u003e [health\\_check\\_grace\\_period\\_seconds](#input\\_health\\_check\\_grace\\_period\\_seconds) | Health check grace period in seconds for the service when using load balancers | `number` | `null` | no |\n| \u003ca name=\"input_wait_for_steady_state\"\u003e\u003c/a\u003e [wait\\_for\\_steady\\_state](#input\\_wait\\_for\\_steady\\_state) | Whether to wait for the service to reach a steady state before continuing | `bool` | `false` | no |\n| \u003ca name=\"input_force_new_deployment\"\u003e\u003c/a\u003e [force\\_new\\_deployment](#input\\_force\\_new\\_deployment) | Whether to force a new task deployment of the service | `bool` | `false` | no |\n| \u003ca name=\"input_network_configuration\"\u003e\u003c/a\u003e [network\\_configuration](#input\\_network\\_configuration) | Network configuration for the ECS service | \u003cpre\u003eobject({\u003cbr/\u003e    subnets          = list(string)\u003cbr/\u003e    security_groups  = list(string)\u003cbr/\u003e    assign_public_ip = optional(bool, false)\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_load_balancer\"\u003e\u003c/a\u003e [load\\_balancer](#input\\_load\\_balancer) | Load balancer configuration for the service | \u003cpre\u003elist(object({\u003cbr/\u003e    target_group_arn = string\u003cbr/\u003e    container_name   = string\u003cbr/\u003e    container_port   = number\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_service_connect_configuration\"\u003e\u003c/a\u003e [service\\_connect\\_configuration](#input\\_service\\_connect\\_configuration) | Service Connect configuration for the service | \u003cpre\u003eobject({\u003cbr/\u003e    enabled   = bool\u003cbr/\u003e    namespace = optional(string)\u003cbr/\u003e    log_configuration = optional(object({\u003cbr/\u003e      log_driver = string\u003cbr/\u003e      options    = map(string)\u003cbr/\u003e    }))\u003cbr/\u003e    service = optional(object({\u003cbr/\u003e      client_alias = object({\u003cbr/\u003e        dns_name = string\u003cbr/\u003e        port     = number\u003cbr/\u003e      })\u003cbr/\u003e      discovery_name = string\u003cbr/\u003e      port_name      = string\u003cbr/\u003e      tls = optional(object({\u003cbr/\u003e        issuer_cert_authority = object({\u003cbr/\u003e          aws_pca_authority_arn = string\u003cbr/\u003e        })\u003cbr/\u003e        kms_key  = optional(string)\u003cbr/\u003e        role_arn = optional(string)\u003cbr/\u003e      }))\u003cbr/\u003e    }))\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n| \u003ca name=\"input_service_registries\"\u003e\u003c/a\u003e [service\\_registries](#input\\_service\\_registries) | Service discovery registries for the service | \u003cpre\u003elist(object({\u003cbr/\u003e    registry_arn   = string\u003cbr/\u003e    port           = optional(number)\u003cbr/\u003e    container_name = optional(string)\u003cbr/\u003e    container_port = optional(number)\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_service_connect_registry_arn\"\u003e\u003c/a\u003e [service\\_connect\\_registry\\_arn](#input\\_service\\_connect\\_registry\\_arn) | ARN of the Service Connect service to register in service registries for external discovery | `string` | `null` | no |\n| \u003ca name=\"input_service_connect_registry_port\"\u003e\u003c/a\u003e [service\\_connect\\_registry\\_port](#input\\_service\\_connect\\_registry\\_port) | Port value for the Service Connect service registry entry | `number` | `null` | no |\n| \u003ca name=\"input_service_connect_registry_container_name\"\u003e\u003c/a\u003e [service\\_connect\\_registry\\_container\\_name](#input\\_service\\_connect\\_registry\\_container\\_name) | Container name for the Service Connect service registry entry | `string` | `null` | no |\n| \u003ca name=\"input_service_connect_registry_container_port\"\u003e\u003c/a\u003e [service\\_connect\\_registry\\_container\\_port](#input\\_service\\_connect\\_registry\\_container\\_port) | Container port for the Service Connect service registry entry | `number` | `null` | no |\n| \u003ca name=\"input_service_connect_discovery_name\"\u003e\u003c/a\u003e [service\\_connect\\_discovery\\_name](#input\\_service\\_connect\\_discovery\\_name) | Discovery name of the Service Connect service to lookup (should match service.discovery\\_name in service\\_connect\\_configuration) | `string` | `null` | no |\n| \u003ca name=\"input_service_connect_namespace_id\"\u003e\u003c/a\u003e [service\\_connect\\_namespace\\_id](#input\\_service\\_connect\\_namespace\\_id) | Namespace ID for Service Connect service discovery lookup | `string` | `null` | no |\n| \u003ca name=\"input_capacity_provider_strategy\"\u003e\u003c/a\u003e [capacity\\_provider\\_strategy](#input\\_capacity\\_provider\\_strategy) | Capacity provider strategy to use for the service | \u003cpre\u003elist(object({\u003cbr/\u003e    capacity_provider = string\u003cbr/\u003e    weight            = number\u003cbr/\u003e    base              = optional(number, 0)\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_deployment_configuration\"\u003e\u003c/a\u003e [deployment\\_configuration](#input\\_deployment\\_configuration) | Deployment configuration for the service | \u003cpre\u003eobject({\u003cbr/\u003e    maximum_percent         = optional(number, 200)\u003cbr/\u003e    minimum_healthy_percent = optional(number, 100)\u003cbr/\u003e    deployment_circuit_breaker = optional(object({\u003cbr/\u003e      enable   = bool\u003cbr/\u003e      rollback = bool\u003cbr/\u003e    }))\u003cbr/\u003e    alarms = optional(object({\u003cbr/\u003e      alarm_names = list(string)\u003cbr/\u003e      enable      = bool\u003cbr/\u003e      rollback    = bool\u003cbr/\u003e    }))\u003cbr/\u003e    deployment_attempts = optional(number, 2)\u003cbr/\u003e  })\u003c/pre\u003e | \u003cpre\u003e{\u003cbr/\u003e  \"maximum_percent\": 200,\u003cbr/\u003e  \"minimum_healthy_percent\": 100\u003cbr/\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_placement_constraints\"\u003e\u003c/a\u003e [placement\\_constraints](#input\\_placement\\_constraints) | Placement constraints for the service | \u003cpre\u003elist(object({\u003cbr/\u003e    type       = string\u003cbr/\u003e    expression = optional(string)\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_ordered_placement_strategy\"\u003e\u003c/a\u003e [ordered\\_placement\\_strategy](#input\\_ordered\\_placement\\_strategy) | Placement strategy for the service | \u003cpre\u003elist(object({\u003cbr/\u003e    type  = string\u003cbr/\u003e    field = optional(string)\u003cbr/\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_volume_configuration\"\u003e\u003c/a\u003e [volume\\_configuration](#input\\_volume\\_configuration) | Configuration for EBS volumes that are attached to tasks | \u003cpre\u003eobject({\u003cbr/\u003e    name = string\u003cbr/\u003e    managed_ebs_volume = object({\u003cbr/\u003e      role_arn         = string\u003cbr/\u003e      encrypted        = optional(bool, true)\u003cbr/\u003e      file_system_type = optional(string, \"ext4\")\u003cbr/\u003e      iops             = optional(number)\u003cbr/\u003e      kms_key_id       = optional(string)\u003cbr/\u003e      size_in_gb       = optional(number, 20)\u003cbr/\u003e      snapshot_id      = optional(string)\u003cbr/\u003e      throughput       = optional(number)\u003cbr/\u003e      volume_type      = optional(string, \"gp3\")\u003cbr/\u003e      tag_specifications = optional(list(object({\u003cbr/\u003e        resource_type = string\u003cbr/\u003e        tags          = map(string)\u003cbr/\u003e      })), [])\u003cbr/\u003e    })\u003cbr/\u003e  })\u003c/pre\u003e | `null` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_id\"\u003e\u003c/a\u003e [id](#output\\_id) | The ID of the ECS service |\n| \u003ca name=\"output_name\"\u003e\u003c/a\u003e [name](#output\\_name) | The name of the ECS service |\n| \u003ca name=\"output_cluster\"\u003e\u003c/a\u003e [cluster](#output\\_cluster) | The cluster the ECS service is associated with |\n| \u003ca name=\"output_desired_count\"\u003e\u003c/a\u003e [desired\\_count](#output\\_desired\\_count) | The desired number of tasks for the ECS service |\n| \u003ca name=\"output_task_definition\"\u003e\u003c/a\u003e [task\\_definition](#output\\_task\\_definition) | The task definition ARN used by the ECS service |\n| \u003ca name=\"output_launch_type\"\u003e\u003c/a\u003e [launch\\_type](#output\\_launch\\_type) | The launch type of the ECS service |\n| \u003ca name=\"output_platform_version\"\u003e\u003c/a\u003e [platform\\_version](#output\\_platform\\_version) | The platform version of the ECS service |\n| \u003ca name=\"output_deployment_configuration\"\u003e\u003c/a\u003e [deployment\\_configuration](#output\\_deployment\\_configuration) | The deployment configuration of the ECS service |\n| \u003ca name=\"output_network_configuration\"\u003e\u003c/a\u003e [network\\_configuration](#output\\_network\\_configuration) | The network configuration of the ECS service |\n| \u003ca name=\"output_load_balancer_configuration\"\u003e\u003c/a\u003e [load\\_balancer\\_configuration](#output\\_load\\_balancer\\_configuration) | The load balancer configuration of the ECS service |\n| \u003ca name=\"output_service_connect_configuration\"\u003e\u003c/a\u003e [service\\_connect\\_configuration](#output\\_service\\_connect\\_configuration) | The service connect configuration of the ECS service |\n| \u003ca name=\"output_service_registries\"\u003e\u003c/a\u003e [service\\_registries](#output\\_service\\_registries) | The effective service registries configuration of the ECS service (includes Service Connect registry if configured) |\n| \u003ca name=\"output_service_connect_service_arn\"\u003e\u003c/a\u003e [service\\_connect\\_service\\_arn](#output\\_service\\_connect\\_service\\_arn) | ARN of the Service Connect service discovered via data source (if lookup is configured) |\n| \u003ca name=\"output_service_connect_service_discovery_name\"\u003e\u003c/a\u003e [service\\_connect\\_service\\_discovery\\_name](#output\\_service\\_connect\\_service\\_discovery\\_name) | Discovery name of the Service Connect service (from configuration) |\n| \u003ca name=\"output_capacity_provider_strategy\"\u003e\u003c/a\u003e [capacity\\_provider\\_strategy](#output\\_capacity\\_provider\\_strategy) | The capacity provider strategy of the ECS service |\n| \u003ca name=\"output_placement_constraints\"\u003e\u003c/a\u003e [placement\\_constraints](#output\\_placement\\_constraints) | The placement constraints of the ECS service |\n| \u003ca name=\"output_placement_strategy\"\u003e\u003c/a\u003e [placement\\_strategy](#output\\_placement\\_strategy) | The placement strategy of the ECS service |\n| \u003ca name=\"output_volume_configuration\"\u003e\u003c/a\u003e [volume\\_configuration](#output\\_volume\\_configuration) | The volume configuration of the ECS service |\n| \u003ca name=\"output_enable_execute_command\"\u003e\u003c/a\u003e [enable\\_execute\\_command](#output\\_enable\\_execute\\_command) | Whether ECS Exec is enabled for the service |\n| \u003ca name=\"output_enable_ecs_managed_tags\"\u003e\u003c/a\u003e [enable\\_ecs\\_managed\\_tags](#output\\_enable\\_ecs\\_managed\\_tags) | Whether ECS managed tags are enabled for the service |\n| \u003ca name=\"output_propagate_tags\"\u003e\u003c/a\u003e [propagate\\_tags](#output\\_propagate\\_tags) | How tags are propagated to tasks |\n| \u003ca name=\"output_tags\"\u003e\u003c/a\u003e [tags](#output\\_tags) | A map of tags assigned to the ECS service |\n| \u003ca name=\"output_tags_all\"\u003e\u003c/a\u003e [tags\\_all](#output\\_tags\\_all) | A map of tags assigned to the resource, including provider default\\_tags |\n| \u003ca name=\"output_service_details\"\u003e\u003c/a\u003e [service\\_details](#output\\_service\\_details) | Comprehensive details about the ECS service for integration purposes |\n| \u003ca name=\"output_service_configuration\"\u003e\u003c/a\u003e [service\\_configuration](#output\\_service\\_configuration) | Summary of the ECS service configuration |\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchbynttdata%2Ftf-aws-module_primitive-ecs_service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaunchbynttdata%2Ftf-aws-module_primitive-ecs_service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchbynttdata%2Ftf-aws-module_primitive-ecs_service/lists"}