https://github.com/justtrackio/terraform-aws-ecs-app
Terraform module which creates a ecs app
https://github.com/justtrackio/terraform-aws-ecs-app
app aws ecs ecs-app
Last synced: 5 months ago
JSON representation
Terraform module which creates a ecs app
- Host: GitHub
- URL: https://github.com/justtrackio/terraform-aws-ecs-app
- Owner: justtrackio
- License: apache-2.0
- Created: 2023-01-04T09:02:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-11T08:42:07.000Z (6 months ago)
- Last Synced: 2026-01-11T14:25:11.506Z (6 months ago)
- Topics: app, aws, ecs, ecs-app
- Language: HCL
- Homepage: https://registry.terraform.io/modules/justtrackio/ecs-app/aws
- Size: 258 KB
- Stars: 2
- Watchers: 4
- Forks: 3
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# terraform-aws-ecs-app
Terraform module which creates a ecs app
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.3.0 |
| [aws](#requirement\_aws) | >= 4.67 |
| [elasticsearch](#requirement\_elasticsearch) | 2.0.7 |
| [elasticstack](#requirement\_elasticstack) | 0.11.11 |
| [gosoline](#requirement\_gosoline) | 1.6.0 |
| [grafana](#requirement\_grafana) | 3.10.0 |
| [sentry](#requirement\_sentry) | 0.13.2 |
## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 4.67 |
## Modules
| Name | Source | Version |
|------|--------|---------|
| [alarm\_service\_resources](#module\_alarm\_service\_resources) | justtrackio/alarm-service-resources/aws | 1.2.0 |
| [alb\_ingress](#module\_alb\_ingress) | cloudposse/alb-ingress/aws | 0.30.0 |
| [cloudwatch\_label](#module\_cloudwatch\_label) | justtrackio/label/null | 0.26.0 |
| [container\_definition](#module\_container\_definition) | cloudposse/ecs-container-definition/aws | 0.61.1 |
| [container\_definition\_fluentbit](#module\_container\_definition\_fluentbit) | cloudposse/ecs-container-definition/aws | 0.61.1 |
| [ecr](#module\_ecr) | terraform-aws-modules/ecr/aws | 2.3.1 |
| [ecr\_label](#module\_ecr\_label) | justtrackio/label/null | 0.26.0 |
| [ecs\_label](#module\_ecs\_label) | justtrackio/label/null | 0.26.0 |
| [ecs\_service\_task\_customized\_autoscaling](#module\_ecs\_service\_task\_customized\_autoscaling) | justtrackio/ecs-autoscaling/aws | 1.2.0 |
| [ecs\_service\_task\_predefined\_autoscaling](#module\_ecs\_service\_task\_predefined\_autoscaling) | justtrackio/ecs-autoscaling/aws | 1.2.0 |
| [ecs\_service\_task\_schedule](#module\_ecs\_service\_task\_schedule) | justtrackio/ecs-autoscaling/aws | 1.2.0 |
| [iam\_policy\_ecs\_access](#module\_iam\_policy\_ecs\_access) | terraform-aws-modules/iam/aws//modules/iam-policy | 5.52.2 |
| [monitoring](#module\_monitoring) | justtrackio/ecs-gosoline-monitoring/aws | 2.7.3 |
| [sentry](#module\_sentry) | justtrackio/project/sentry | 1.4.2 |
| [service\_task](#module\_service\_task) | justtrackio/ecs-alb-service-task/aws | 1.6.0 |
| [ssm\_label](#module\_ssm\_label) | justtrackio/label/null | 0.26.0 |
| [this](#module\_this) | justtrackio/label/null | 0.26.0 |
## Resources
| Name | Type |
|------|------|
| [aws_cloudwatch_log_group.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_ssm_parameter.container_cpu](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter) | resource |
| [aws_ssm_parameter.container_memory](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_parameter) | resource |
| [aws_ecr_lifecycle_policy_document.lifecycle](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecr_lifecycle_policy_document) | data source |
| [aws_ecs_cluster.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecs_cluster) | data source |
| [aws_iam_policy_document.ecs_access](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_lb.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/lb) | data source |
| [aws_lb_listener.http](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/lb_listener) | data source |
| [aws_lb_listener.https](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/lb_listener) | data source |
| [aws_ssm_parameter.container_tag](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
| [aws_ssm_parameter.grafana_token](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
| [aws_ssm_parameter.keep_api_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
| [aws_ssm_parameter.sentry_token](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ssm_parameter) | data source |
| [aws_vpc.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [additional\_tag\_map](#input\_additional\_tag\_map) | Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not added to `tags` or `id`.
This is for some rare cases where resources want additional configuration of tags
and therefore take a list of maps with tag key, value, and additional configuration. | `map(string)` | `{}` | no |
| [alarm\_consumer](#input\_alarm\_consumer) | This can be used to override alarms for consumers. Keys are names of the consumers. |
map(object({
alarm_description = optional(string)
datapoints_to_alarm = optional(number, 3)
evaluation_periods = optional(number, 3)
period = optional(number, 60)
success_rate_threshold = optional(number, 99)
alarm_levels = optional(list(string), ["warning", "high"])
})) | `{}` | no |
| [alarm\_enabled](#input\_alarm\_enabled) | Defines if alarms should be created | `bool` | `false` | no |
| [alarm\_gateway](#input\_alarm\_gateway) | This can be used to override alarms for gateway routes. Keys are names of the gateway route. | map(object({
alarm_description = optional(string)
datapoints_to_alarm = optional(number, 3)
evaluation_periods = optional(number, 3)
period = optional(number, 60)
success_rate_threshold = optional(number, 99)
alarm_levels = optional(list(string), ["warning", "high"])
})) | `{}` | no |
| [alarm\_kinsumer](#input\_alarm\_kinsumer) | This can be used to override alarms for kinsumers. Keys are names of the kinsumers. | map(object({
alarm_description = optional(string)
datapoints_to_alarm = optional(number, 1)
evaluation_periods = optional(number, 1)
period = optional(number, 60)
threshold_seconds_behind = optional(number, 3600)
alarm_levels = optional(list(string), ["warning", "high"])
})) | `{}` | no |
| [alarm\_scheduled](#input\_alarm\_scheduled) | This can be used to override scheduled alarm | object({
alarm_description = optional(string)
datapoints_to_alarm = optional(number, 1)
evaluation_periods = optional(number, 1)
period = optional(number, 60)
threshold = optional(number, 0)
alarm_priority = optional(string, "high")
}) | `{}` | no |
| [alarm\_service\_resources\_cpu\_average](#input\_alarm\_service\_resources\_cpu\_average) | Average CPUUtilization alarm specs | object({
datapoints_to_alarm = optional(number, 6)
evaluation_periods = optional(number, 6)
period = optional(number, 300)
threshold = optional(number, 125)
}) | {
"datapoints_to_alarm": 6,
"evaluation_periods": 6,
"period": 300,
"threshold": 125
} | no |
| [alarm\_service\_resources\_cpu\_maximum](#input\_alarm\_service\_resources\_cpu\_maximum) | Maximum CPUUtilization alarm specs | object({
datapoints_to_alarm = optional(number, 15)
evaluation_periods = optional(number, 15)
period = optional(number, 60)
threshold = optional(number, 150)
}) | {
"datapoints_to_alarm": 15,
"evaluation_periods": 15,
"period": 60,
"threshold": 150
} | no |
| [alarm\_service\_resources\_enabled](#input\_alarm\_service\_resources\_enabled) | Defines if resource alarms should be created | `bool` | `false` | no |
| [alarm\_service\_resources\_memory\_average](#input\_alarm\_service\_resources\_memory\_average) | Average MemoryUtilization alarm specs | object({
datapoints_to_alarm = optional(number, 6)
evaluation_periods = optional(number, 6)
period = optional(number, 300)
threshold = optional(number, 125)
}) | {
"datapoints_to_alarm": 6,
"evaluation_periods": 6,
"period": 300,
"threshold": 125
} | no |
| [alarm\_service\_resources\_memory\_maximum](#input\_alarm\_service\_resources\_memory\_maximum) | Maximum MemoryUtilization alarm specs | object({
datapoints_to_alarm = optional(number, 15)
evaluation_periods = optional(number, 15)
period = optional(number, 60)
threshold = optional(number, 150)
}) | {
"datapoints_to_alarm": 15,
"evaluation_periods": 15,
"period": 60,
"threshold": 150
} | no |
| [alarm\_service\_resources\_priority](#input\_alarm\_service\_resources\_priority) | Priority for service resources alarms | `string` | `"info"` | no |
| [alarm\_service\_resources\_treat\_missing\_data](#input\_alarm\_service\_resources\_treat\_missing\_data) | How to treat missing data, defaults to 'breaching' | `string` | `"breaching"` | no |
| [alb\_health\_check](#input\_alb\_health\_check) | ALB target group healthy check values | object({
enabled = optional(bool, true)
healthy_threshold = optional(number, 2)
unhealthy_threshold = optional(number, 2)
threshold = optional(number, 2)
interval = optional(number, 30)
timeout = optional(number, 10)
matcher = optional(string, "200")
path = optional(string, "/health")
port = optional(string, "traffic-port")
protocol = optional(string, "HTTP")
}) | `{}` | no |
| [alb\_name](#input\_alb\_name) | Name of the alb used to attach the target group | `string` | `""` | no |
| [alb\_stickiness\_enabled](#input\_alb\_stickiness\_enabled) | Boolean to enable / disable `stickiness`. Default is `true` | `bool` | `false` | no |
| [alb\_unauthenticated\_hosts](#input\_alb\_unauthenticated\_hosts) | Unauthenticated hosts to match in Hosts header | `list(string)` | `[]` | no |
| [alb\_unauthenticated\_paths](#input\_alb\_unauthenticated\_paths) | Unauthenticated path pattern to match (a maximum of 1 can be defined) | `list(string)` | [
"*"
]
| no |
| [alb\_unauthenticated\_priority](#input\_alb\_unauthenticated\_priority) | The priority for the rules without authentication, between 1 and 50000 (1 being highest priority). Must be different from `authenticated_priority` since a listener can't have multiple rules with the same priority | `number` | `100` | no |
| [app\_image\_tag](#input\_app\_image\_tag) | The default container image to use in container definition | `string` | `null` | no |
| [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,
in the order they appear in the list. New attributes are appended to the
end of the list. The elements of the list are joined by the `delimiter`
and treated as a single ID element. | `list(string)` | `[]` | no |
| [autoscaling\_customized\_metric\_name](#input\_autoscaling\_customized\_metric\_name) | The name of the metric | `string` | `""` | no |
| [autoscaling\_customized\_statistic](#input\_autoscaling\_customized\_statistic) | The name of the metric | `string` | `"Average"` | no |
| [autoscaling\_customized\_unit](#input\_autoscaling\_customized\_unit) | The name of the metric | `string` | `"Count"` | no |
| [autoscaling\_enabled](#input\_autoscaling\_enabled) | Defines if autoscaling should be enabled | `bool` | `false` | no |
| [autoscaling\_max\_capacity](#input\_autoscaling\_max\_capacity) | Maximum number of running instances of a Service | `number` | `200` | no |
| [autoscaling\_min\_capacity](#input\_autoscaling\_min\_capacity) | Minimum number of running instances of a Service | `number` | `1` | no |
| [autoscaling\_predefined\_metric\_type](#input\_autoscaling\_predefined\_metric\_type) | The metric type | `string` | `null` | no |
| [autoscaling\_scale\_in\_cooldown](#input\_autoscaling\_scale\_in\_cooldown) | The amount of time, in seconds, after a scale in activity completes before another scale in activity can start | `number` | `60` | no |
| [autoscaling\_scale\_out\_cooldown](#input\_autoscaling\_scale\_out\_cooldown) | The amount of time, in seconds, after a scale out activity completes before another scale out activity can start | `number` | `60` | no |
| [autoscaling\_schedule](#input\_autoscaling\_schedule) | Provides an Application AutoScaling ScheduledAction resource | list(object({
schedule = string
min_capacity = number
max_capacity = number
})) | `[]` | no |
| [autoscaling\_target\_value](#input\_autoscaling\_target\_value) | The target value for the metric | `number` | `null` | no |
| [aws\_account\_id](#input\_aws\_account\_id) | AWS account id | `string` | `null` | no |
| [aws\_region](#input\_aws\_region) | AWS region | `string` | `null` | no |
| [circuit\_breaker\_deployment\_enabled](#input\_circuit\_breaker\_deployment\_enabled) | If `true`, enable the deployment circuit breaker logic for the service | `bool` | `false` | no |
| [circuit\_breaker\_rollback\_enabled](#input\_circuit\_breaker\_rollback\_enabled) | If `true`, Amazon ECS will roll back the service if a service deployment fails | `bool` | `false` | no |
| [cloudwatch\_log\_group\_enabled](#input\_cloudwatch\_log\_group\_enabled) | A boolean to disable cloudwatch log group creation | `bool` | `true` | no |
| [container\_cpu](#input\_container\_cpu) | The vCPU setting to control cpu limits of container. (If FARGATE launch type is used below, this must be a supported vCPU size from the table here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html) | `number` | `null` | no |
| [container\_map\_environment](#input\_container\_map\_environment) | The environment variables to pass to the container. This is a map of string: {key: value}. `environment` overrides `map_environment` | `map(string)` | `null` | no |
| [container\_map\_secrets](#input\_container\_map\_secrets) | The secrets variables to pass to the container. This is a map of string: {key: value}. map\_secrets overrides secrets | `map(string)` | `null` | no |
| [container\_memory](#input\_container\_memory) | The amount of RAM to allow container to use in MB. (If FARGATE launch type is used below, this must be a supported Memory size from the table here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html) | `number` | `null` | no |
| [container\_memory\_reservation](#input\_container\_memory\_reservation) | The amount of RAM (Soft Limit) to allow container to use in MB. This value must be less than `container_memory` if set | `number` | `null` | no |
| [container\_start\_timeout](#input\_container\_start\_timeout) | Time duration (in seconds) to wait before giving up on resolving dependencies for a container | `number` | `null` | no |
| [container\_stop\_timeout](#input\_container\_stop\_timeout) | Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own | `number` | `null` | no |
| [context](#input\_context) | Single object for setting entire context at once.
See description of individual variables for details.
Leave string and numeric variables as `null` to use default value.
Individual variable settings (non-null) override settings in context object,
except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | {
"additional_tag_map": {},
"attributes": [],
"delimiter": null,
"descriptor_formats": {},
"enabled": true,
"environment": null,
"id_length_limit": null,
"label_key_case": null,
"label_order": [],
"label_value_case": null,
"labels_as_tags": [
"unset"
],
"name": null,
"namespace": null,
"regex_replace_chars": null,
"stage": null,
"tags": {},
"tenant": null
} | no |
| [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
| [deployment\_maximum\_percent](#input\_deployment\_maximum\_percent) | The upper limit of the number of tasks (as a percentage of `desired_count`) that can be running in a service during a deployment | `number` | `200` | no |
| [deployment\_minimum\_healthy\_percent](#input\_deployment\_minimum\_healthy\_percent) | The lower limit (as a percentage of `desired_count`) of the number of tasks that must remain running and healthy in a service during a deployment | `number` | `100` | no |
| [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.
Map of maps. Keys are names of descriptors. Values are maps of the form
`{
format = string
labels = list(string)
}`
(Type is `any` so the map values can later be enhanced to provide additional options.)
`format` is a Terraform format string to be passed to the `format()` function.
`labels` is a list of labels, in order, to pass to `format()` function.
Label values will be normalized before being passed to `format()` so they will be
identical to how they appear in `id`.
Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |
| [desired\_count](#input\_desired\_count) | The desired number of tasks to start with. Set this to 0 if using DAEMON Service type. (FARGATE does not suppoert DAEMON Service type) | `number` | `1` | no |
| [docker\_labels](#input\_docker\_labels) | The configuration options to send to the `docker_labels` | `map(string)` | `null` | no |
| [domain](#input\_domain) | The default domain | `string` | n/a | yes |
| [ecr\_repository\_lifecycle\_policy](#input\_ecr\_repository\_lifecycle\_policy) | The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs | `string` | `null` | no |
| [ecs\_access\_policy\_enabled](#input\_ecs\_access\_policy\_enabled) | Defines if the ecs tasks should have the ecs access policy | `bool` | `false` | no |
| [elasticsearch\_data\_stream\_enabled](#input\_elasticsearch\_data\_stream\_enabled) | Defines whether there will be a elasticsearch data\_stream, index template, index lifecycle policy created | `bool` | `true` | no |
| [elasticsearch\_host](#input\_elasticsearch\_host) | Defines the elasticsearch host to query for logs | `string` | `null` | no |
| [elasticsearch\_index\_template](#input\_elasticsearch\_index\_template) | This defines the properties used within the index template (Only used if create\_elasticsearch\_data\_stream is true) | object({
additional_fields = map(any)
name = string
priority = number
node_name = string
number_of_shards = number
number_of_replicas = number
}) | {
"additional_fields": {},
"name": "",
"node_name": "*",
"number_of_replicas": 1,
"number_of_shards": 1,
"priority": 250
} | no |
| [elasticsearch\_lifecycle\_policy](#input\_elasticsearch\_lifecycle\_policy) | This defines the properties used within the index lifecycle management policy (Only used if create\_elasticsearch\_data\_stream is true) | object({
delete_phase_min_age = string
hot_phase_max_primary_shard_size = string
hot_phase_max_age = optional(string)
warm_phase_min_age = string
warm_phase_number_of_replicas = number
}) | {
"delete_phase_min_age": "28d",
"hot_phase_max_primary_shard_size": "10gb",
"warm_phase_min_age": "0d",
"warm_phase_number_of_replicas": 0
} | no |
| [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
| [environment](#input\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |
| [exec\_enabled](#input\_exec\_enabled) | Specifies whether to enable Amazon ECS Exec for the tasks within the service | `bool` | `true` | no |
| [gosoline\_metadata](#input\_gosoline\_metadata) | Define custom metadata for the gosoline provider | object({
domain = optional(string),
use_https = optional(string),
port = optional(string)
}) | `null` | no |
| [gosoline\_name\_patterns](#input\_gosoline\_name\_patterns) | Define custom name patters for the gosoline provider | object({
hostname = optional(string),
cloudwatch_namespace = optional(string),
ecs_cluster = optional(string),
ecs_service = optional(string),
grafana_cloudwatch_datasource = optional(string),
grafana_elasticsearch_datasource = optional(string)
}) | {
"cloudwatch_namespace": "{env}/{group}/{app}",
"ecs_cluster": "{env}",
"ecs_service": "{group}-{app}",
"grafana_cloudwatch_datasource": "cloudwatch-{family}",
"grafana_elasticsearch_datasource": "elasticsearch-{env}-{family}-{group}-{app}",
"hostname": "{scheme}://{app}.{group}.{env}.{metadata_domain}:{port}"
} | no |
| [grafana\_dashboard\_url](#input\_grafana\_dashboard\_url) | Url of the grafana dashboard | `string` | `null` | no |
| [health\_check\_grace\_period\_seconds](#input\_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` | `0` | no |
| [healthcheck](#input\_healthcheck) | A map containing command (string), timeout, interval (duration in seconds), retries (1-10, number of times to retry before marking container unhealthy), and startPeriod (0-300, optional grace period to wait, in seconds, before failed healthchecks count toward retries) | object({
command = list(string)
retries = number
timeout = number
interval = number
startPeriod = number
}) | `null` | no |
| [id\_length\_limit](#input\_id\_length\_limit) | Limit `id` to this many characters (minimum 6).
Set to `0` for unlimited length.
Set to `null` for keep the existing setting, which defaults to `0`.
Does not affect `id_full`. | `number` | `null` | no |
| [ignore\_changes\_desired\_count](#input\_ignore\_changes\_desired\_count) | Whether to ignore changes for desired count in the ECS service | `bool` | `true` | no |
| [ignore\_changes\_task\_definition](#input\_ignore\_changes\_task\_definition) | Ignore changes (like environment variables) to the ECS task definition | `bool` | `false` | no |
| [kibana\_data\_view\_enabled](#input\_kibana\_data\_view\_enabled) | Defines whether there will be a kibana data view | `bool` | `true` | no |
| [kibana\_host](#input\_kibana\_host) | Defines the kibana host | `string` | `null` | no |
| [kibana\_space\_id](#input\_kibana\_space\_id) | Space identifier to place the kibana data view into | `string` | `null` | no |
| [label\_key\_case](#input\_label\_key\_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `null` | no |
| [label\_order](#input\_label\_order) | The order in which the labels (ID elements) appear in the `id`.
Defaults to ["namespace", "environment", "stage", "name", "attributes"].
You can omit any of the 6 labels ("tenant" is the 6th), but at least one must be present. | `list(string)` | `null` | no |
| [label\_orders](#input\_label\_orders) | Overrides the `labels_order` for the different labels to modify ID elements appear in the `id` | object({
cloudwatch = optional(list(string), ["environment", "stage", "name"]),
ecr = optional(list(string)),
ecs = optional(list(string), ["stage", "name"]),
ec2 = optional(list(string), ["environment", "stage", "name"]),
iam = optional(list(string)),
sentry = optional(list(string), ["stage", "name"]),
ssm = optional(list(string)),
vpc = optional(list(string)),
elasticsearch = optional(list(string), ["environment", "namespace", "stage", "name"])
kibana = optional(list(string))
}) | `{}` | no |
| [label\_value\_case](#input\_label\_value\_case) | Controls the letter case of ID elements (labels) as included in `id`,
set as tag values, and output by this module individually.
Does not affect values of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper` and `none` (no transformation).
Set this to `title` and set `delimiter` to `""` to yield Pascal Case IDs.
Default value: `lower`. | `string` | `null` | no |
| [labels\_as\_tags](#input\_labels\_as\_tags) | Set of labels (ID elements) to include as tags in the `tags` output.
Default is to include all labels.
Tags with empty values will not be included in the `tags` output.
Set to `[]` to suppress all generated tags.
**Notes:**
The value of the `name` tag, if included, will be the `id`, not the `name`.
Unlike other `null-label` inputs, the initial setting of `labels_as_tags` cannot be
changed in later chained modules. Attempts to change it will be silently ignored. | `set(string)` | [
"default"
]
| no |
| [launch\_type](#input\_launch\_type) | The ECS launch type (valid options: FARGATE or EC2) | `string` | `"EC2"` | no |
| [log\_driver](#input\_log\_driver) | The log driver to use for the container. If using Fargate launch type, only supported value is awslogs | `string` | `"awsfirelens"` | no |
| [log\_retention\_in\_days](#input\_log\_retention\_in\_days) | The number of days to retain logs for the log group | `number` | `1` | no |
| [log\_router\_container\_cpu](#input\_log\_router\_container\_cpu) | The log router cpu reservation for the ECS task definition | `string` | `30` | no |
| [log\_router\_container\_map\_environment](#input\_log\_router\_container\_map\_environment) | The environment variables to pass to the log router container. This is a map of string: {key: value}. `environment` overrides `map_environment` | `map(string)` | `null` | no |
| [log\_router\_container\_memory\_reservation](#input\_log\_router\_container\_memory\_reservation) | The log router memory reservation for the ECS task definition | `string` | `64` | no |
| [log\_router\_essential](#input\_log\_router\_essential) | Determines whether all other containers in a task are stopped, if this container fails or stops for any reason. Due to how Terraform type casts booleans in json it is required to double quote this value | `bool` | `false` | no |
| [log\_router\_image\_repository](#input\_log\_router\_image\_repository) | Container registry repository url | `string` | n/a | yes |
| [log\_router\_image\_tag](#input\_log\_router\_image\_tag) | The default container image to use in container definition | `string` | `"stable-3.2.9"` | no |
| [log\_router\_options](#input\_log\_router\_options) | The log router options to use | `map(string)` | {
"config-file-type": "file",
"config-file-value": "/fluent-bit/etc/extra.conf"
} | no |
| [log\_router\_stop\_timeout](#input\_log\_router\_stop\_timeout) | Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own | `number` | `60` | no |
| [log\_router\_type](#input\_log\_router\_type) | The log router type to use | `string` | `"fluentbit"` | no |
| [metric\_based\_autoscaling\_ignore\_changes\_min\_max\_capacity](#input\_metric\_based\_autoscaling\_ignore\_changes\_min\_max\_capacity) | Whether or not to ignore min\_capacity/max\_capacity changes on the aws\_appautoscaling\_target of the metric based autoscaling module | `bool` | `false` | no |
| [metric\_calculator\_enabled](#input\_metric\_calculator\_enabled) | Whether to use the metrics produced by the metric calculator for autoscaling (gosoline feature), see: https://github.com/justtrackio/gosoline | `bool` | `null` | no |
| [metric\_enabled](#input\_metric\_enabled) | Defines if metrics should be written | `bool` | n/a | yes |
| [monitoring\_enabled](#input\_monitoring\_enabled) | Defines if the monitoring module should be created | `bool` | `true` | no |
| [name](#input\_name) | ID element. Usually the component or solution name, e.g. 'app' or 'jenkins'.
This is the only ID element not also included as a `tag`.
The "name" tag is set to the full `id` string. There is no tag with the value of the `name` input. | `string` | `null` | no |
| [namespace](#input\_namespace) | ID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp', to help ensure generated IDs are globally unique | `string` | `null` | no |
| [network\_mode](#input\_network\_mode) | The network mode to use for the task. This is required to be `awsvpc` for `FARGATE` `launch_type` or `null` for `EC2` `launch_type` | `string` | `null` | no |
| [ordered\_placement\_strategy](#input\_ordered\_placement\_strategy) | Service level strategy rules that are taken into consideration during task placement.
List from top to bottom in order of precedence. The maximum number of ordered\_placement\_strategy blocks is 5.
See [`ordered_placement_strategy`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_service#ordered_placement_strategy) | list(object({
type = string
field = string
})) | [
{
"field": "instanceId",
"type": "spread"
}
]
| no |
| [organizational\_unit](#input\_organizational\_unit) | Usually used to indicate the AWS organizational unit, e.g. 'prod', 'sdlc' | `string` | `null` | no |
| [port\_gateway](#input\_port\_gateway) | Define the gateway port | `number` | `8088` | no |
| [port\_health](#input\_port\_health) | Define the health port | `number` | `8090` | no |
| [port\_mappings](#input\_port\_mappings) | The port mappings to configure for the container. This is a list of maps. Each map should contain "containerPort", "hostPort", and "protocol", where "protocol" is one of "tcp" or "udp". If using containers in a task with the awsvpc or host network mode, the hostPort can either be left blank or set to the same value as the containerPort | list(object({
containerPort = number
hostPort = number
protocol = string
})) | `[]` | no |
| [port\_metadata](#input\_port\_metadata) | Define the metadata port | `number` | `8070` | no |
| [propagate\_tags](#input\_propagate\_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` | `null` | no |
| [regex\_replace\_chars](#input\_regex\_replace\_chars) | Terraform regular expression (regex) string.
Characters matching the regex will be removed from the ID elements.
If not set, `"/[^a-zA-Z0-9-]/"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |
| [scheduled\_autoscaling\_ignore\_changes\_min\_max\_capacity](#input\_scheduled\_autoscaling\_ignore\_changes\_min\_max\_capacity) | Whether or not to ignore min\_capacity/max\_capacity changes on the aws\_appautoscaling\_target of the scheduled autoscaling module | `bool` | `true` | no |
| [sentry\_alarm\_action\_match](#input\_sentry\_alarm\_action\_match) | Trigger actions when an event is captured by Sentry and `any` or `all` of the specified conditions happen. | `string` | `"any"` | no |
| [sentry\_alarm\_actions](#input\_sentry\_alarm\_actions) | List of actions. In JSON string format. | `string` | `"[]"` | no |
| [sentry\_alarm\_conditions](#input\_sentry\_alarm\_conditions) | List of conditions. In JSON string format. | `string` | `"[]"` | no |
| [sentry\_alarm\_filter\_match](#input\_sentry\_alarm\_filter\_match) | A string determining which filters need to be true before any actions take place. Required when a value is provided for filters. | `string` | `"all"` | no |
| [sentry\_alarm\_filters](#input\_sentry\_alarm\_filters) | A list of filters that determine if a rule fires after the necessary conditions have been met. In JSON string format. | `string` | `null` | no |
| [sentry\_alarm\_frequency](#input\_sentry\_alarm\_frequency) | Perform actions at most once every X minutes for this issue. | `number` | `5` | no |
| [sentry\_dsn](#input\_sentry\_dsn) | Define a custom sentry dsn if `sentry_enabled` is set to `false` | `string` | `null` | no |
| [sentry\_enabled](#input\_sentry\_enabled) | Set to false to prevent the module from creating any resources for sentry | `bool` | `true` | no |
| [service\_placement\_constraints](#input\_service\_placement\_constraints) | The rules that are taken into consideration during task placement. Maximum number of placement\_constraints is 10. See [`placement_constraints`](https://www.terraform.io/docs/providers/aws/r/ecs_service.html#placement_constraints-1) docs | list(object({
type = string
expression = string
})) | `[]` | no |
| [service\_registries](#input\_service\_registries) | Zero or one service discovery registries for the service.
The currently supported service registry is Amazon Route 53 Auto Naming Service - `aws_service_discovery_service`;
see `service_registries` docs https://www.terraform.io/docs/providers/aws/r/ecs_service.html#service_registries-1"
Service registry is object with required key `registry_arn = string` and optional keys
`port = number`
`container_name = string`
`container_port = number` | `list(any)` | `[]` | no |
| [stage](#input\_stage) | ID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |
| [tags](#input\_tags) | Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`).
Neither the tag keys nor the tag values will be modified by this module. | `map(string)` | `{}` | no |
| [target\_group\_arn](#input\_target\_group\_arn) | ARN of the target group to register the task into. Only works when alb\_name is not specified. Can be used for services that are made available via a vpc endpoint | `string` | `""` | no |
| [task\_cpu](#input\_task\_cpu) | The number of CPU units used by the task. If unspecified, it will default to `container_cpu`. If using `FARGATE` launch type `task_cpu` must match supported memory values (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size) | `number` | `null` | no |
| [task\_memory](#input\_task\_memory) | The amount of memory (in MiB) used by the task. If unspecified, it will default to `container_memory`. If using Fargate launch type `task_memory` must match supported cpu value (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size) | `number` | `null` | no |
| [task\_policy\_arns](#input\_task\_policy\_arns) | A list of IAM Policy ARNs to attach to the generated task role. | `list(string)` | `[]` | no |
| [tenant](#input\_tenant) | ID element \_(Rarely used, not included by default)\_. A customer identifier, indicating who this instance of a resource is for | `string` | `null` | no |
| [tracing\_provider](#input\_tracing\_provider) | Defines which tracing provider to use. Valid values are 'local', 'xray', 'noop', or any tracer you registered yourself | `string` | `"local"` | no |
| [ulimits](#input\_ulimits) | The ulimits to configure for the container. This is a list of maps. Each map should contain "name", "softLimit" and "hardLimit" | list(object({
name = string
softLimit = number
hardLimit = number
})) | `[]` | no |
| [wait\_for\_steady\_state](#input\_wait\_for\_steady\_state) | If true, it will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing | `bool` | `true` | no |
| [working\_directory](#input\_working\_directory) | The working directory to run commands inside the container | `string` | `"/app"` | no |
## Outputs
No outputs.