From ab23eea35e34aaef67581005734b95e02595405c Mon Sep 17 00:00:00 2001 From: Keir Badger Date: Fri, 29 Dec 2023 12:35:15 +0000 Subject: [PATCH] Update readme --- README.md | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/README.md b/README.md index c46f52f..9cbe910 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,95 @@ [![Test](https://github.com/mergermarket/terraform-acuris-ecs-service/actions/workflows/test.yml/badge.svg)](https://github.com/mergermarket/terraform-acuris-ecs-service/actions/workflows/test.yml) An ECS service with an ALB target group, suitable for routing to from an ALB. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 0.12 | + +## Providers + +| Name | Version | +|------|---------| +| [aws](#provider\_aws) | n/a | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [ecs\_update\_monitor](#module\_ecs\_update\_monitor) | mergermarket/ecs-update-monitor/acuris | 2.3.5 | +| [service](#module\_service) | mergermarket/load-balanced-ecs-service-no-target-group/acuris | 2.2.7 | +| [service\_container\_definition](#module\_service\_container\_definition) | mergermarket/ecs-container-definition/acuris | 2.2.0 | +| [taskdef](#module\_taskdef) | mergermarket/task-definition-with-task-role/acuris | 2.1.0 | + +## Resources + +| Name | Type | +|------|------| +| [aws_appautoscaling_scheduled_action.scale_back_up](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/appautoscaling_scheduled_action) | resource | +| [aws_appautoscaling_scheduled_action.scale_down](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/appautoscaling_scheduled_action) | resource | +| [aws_appautoscaling_target.ecs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/appautoscaling_target) | resource | +| [aws_cloudwatch_log_group.stderr](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource | +| [aws_cloudwatch_log_group.stdout](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource | +| [aws_cloudwatch_log_subscription_filter.kinesis_log_stderr_stream](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_subscription_filter) | resource | +| [aws_cloudwatch_log_subscription_filter.kinesis_log_stdout_stream](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_subscription_filter) | resource | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [add\_datadog\_feed](#input\_add\_datadog\_feed) | Flag to control adding subscription filter to CW loggroup | `bool` | `true` | no | +| [allow\_overnight\_scaledown](#input\_allow\_overnight\_scaledown) | Allow service to be scaled down | `bool` | `true` | no | +| [application\_environment](#input\_application\_environment) | Environment specific parameters passed to the container | `map(string)` | `{}` | no | +| [application\_secrets](#input\_application\_secrets) | A list of application specific secret names that can be found in aws secrets manager | `list(string)` | `[]` | no | +| [assume\_role\_policy](#input\_assume\_role\_policy) | A valid IAM policy for assuming roles - optional | `string` | `""` | no | +| [common\_application\_environment](#input\_common\_application\_environment) | Environment parameters passed to the container for all environments | `map(string)` | `{}` | no | +| [container\_labels](#input\_container\_labels) | Additional docker labels to apply to the container. | `map(string)` | `{}` | no | +| [container\_mountpoint](#input\_container\_mountpoint) | Map containing 'sourceVolume', 'containerPath' and 'readOnly' (optional) to map a volume into a container. | `map(string)` | `{}` | no | +| [container\_port\_mappings](#input\_container\_port\_mappings) | JSON document containing an array of port mappings for the container defintion - if set port is ignored (optional). | `string` | `""` | no | +| [cpu](#input\_cpu) | CPU unit reservation for the container | `string` | n/a | yes | +| [deployment\_maximum\_percent](#input\_deployment\_maximum\_percent) | The maximumPercent parameter represents an upper limit on the number of your service's tasks that are allowed in the RUNNING or PENDING state during a deployment, as a percentage of the desiredCount (rounded down to the nearest integer). | `string` | `"200"` | no | +| [deployment\_minimum\_healthy\_percent](#input\_deployment\_minimum\_healthy\_percent) | The minimumHealthyPercent represents a lower limit on the number of your service's tasks that must remain in the RUNNING state during a deployment, as a percentage of the desiredCount (rounded up to the nearest integer). | `string` | `"100"` | no | +| [deployment\_timeout](#input\_deployment\_timeout) | Timeout to wait for the deployment to be finished [seconds]. | `number` | `600` | no | +| [desired\_count](#input\_desired\_count) | The number of instances of the task definition to place and keep running. | `string` | `"3"` | no | +| [ecs\_cluster](#input\_ecs\_cluster) | The ECS cluster | `string` | `"default"` | no | +| [env](#input\_env) | Environment name | `any` | n/a | yes | +| [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 2147483647. Default 0. | `string` | `"0"` | no | +| [image\_id](#input\_image\_id) | ECR image\_id for the ecs container | `string` | `""` | no | +| [is\_test](#input\_is\_test) | For testing only. Stops the call to AWS for sts | `bool` | `false` | no | +| [log\_subscription\_arn](#input\_log\_subscription\_arn) | To enable logging to a kinesis stream | `string` | `""` | no | +| [memory](#input\_memory) | The memory reservation for the container in megabytes | `string` | n/a | yes | +| [multiple\_target\_group\_arns](#input\_multiple\_target\_group\_arns) | Mutiple target group ARNs to allow connection to multiple loadbalancers | `list` | `[]` | no | +| [name\_suffix](#input\_name\_suffix) | Set a suffix that will be applied to the name in order that a component can have multiple services per environment | `string` | `""` | no | +| [network\_configuration\_security\_groups](#input\_network\_configuration\_security\_groups) | needed for network\_mode awsvpc | `list` | `[]` | no | +| [network\_configuration\_subnets](#input\_network\_configuration\_subnets) | needed for network\_mode awsvpc | `list` | `[]` | no | +| [network\_mode](#input\_network\_mode) | The Docker networking mode to use for the containers in the task | `string` | `"bridge"` | no | +| [nofile\_soft\_ulimit](#input\_nofile\_soft\_ulimit) | The soft ulimit for the number of files in container | `string` | `"4096"` | no | +| [overnight\_scaledown\_end\_hour](#input\_overnight\_scaledown\_end\_hour) | When to bring service back to full strength (Hour in UTC) | `string` | `"06"` | no | +| [overnight\_scaledown\_min\_count](#input\_overnight\_scaledown\_min\_count) | Minimum task count overnight | `string` | `"0"` | no | +| [overnight\_scaledown\_start\_hour](#input\_overnight\_scaledown\_start\_hour) | From when a service can be scaled down (Hour in UTC) | `string` | `"22"` | no | +| [pack\_and\_distinct](#input\_pack\_and\_distinct) | Enable distinct instance and task binpacking for better cluster utilisation. Enter 'true' for clusters with auto scaling groups. Enter 'false' for clusters with no ASG and instant counts less than or equal to desired tasks | `string` | `"false"` | no | +| [platform\_config](#input\_platform\_config) | Platform configuration | `map(string)` | `{}` | no | +| [platform\_secrets](#input\_platform\_secrets) | A list of common secret names for "the platform" that can be found in secrets manager | `list(string)` | `[]` | no | +| [port](#input\_port) | The port that container will be running on | `string` | n/a | yes | +| [privileged](#input\_privileged) | Gives the container privileged access to the host | `bool` | `false` | no | +| [release](#input\_release) | Metadata about the release | `map(string)` | n/a | yes | +| [secrets](#input\_secrets) | Secret credentials fetched using credstash | `map(string)` | `{}` | no | +| [stop\_timeout](#input\_stop\_timeout) | The duration is seconds to wait before the container is forcefully killed. Default 30s, max 120s. | `string` | `"none"` | no | +| [target\_group\_arn](#input\_target\_group\_arn) | The ALB target group for the service. | `string` | `""` | no | +| [task\_role\_policy](#input\_task\_role\_policy) | IAM policy document to apply to the tasks via a task role | `string` | `"{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Action\": \"sts:GetCallerIdentity\",\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ]\n}\n"` | no | +| [taskdef\_volume](#input\_taskdef\_volume) | Map containing 'name' and 'host\_path' used to add a volume mapping to the taskdef. | `map(string)` | `{}` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [full\_service\_name](#output\_full\_service\_name) | n/a | +| [stderr\_name](#output\_stderr\_name) | n/a | +| [stdout\_name](#output\_stdout\_name) | n/a | +| [task\_role\_arn](#output\_task\_role\_arn) | n/a | +| [task\_role\_name](#output\_task\_role\_name) | n/a | +| [taskdef\_arn](#output\_taskdef\_arn) | n/a | + \ No newline at end of file