-
-
Notifications
You must be signed in to change notification settings - Fork 245
/
README.yaml
89 lines (78 loc) · 4.73 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: terraform-aws-ecs-container-definition
license: APACHE2
github_repo: cloudposse/terraform-aws-ecs-container-definition
badges:
- name: Latest Release
image: https://img.shields.io/github/release/cloudposse/terraform-aws-ecs-container-definition.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-ecs-container-definition/releases/latest
- name: Last Updated
image: https://img.shields.io/github/last-commit/cloudposse/terraform-aws-ecs-container-definition.svg?style=for-the-badge
url: https://github.com/cloudposse/terraform-aws-ecs-container-definition/commits
- name: Slack Community
image: https://slack.cloudposse.com/for-the-badge.svg
url: https://slack.cloudposse.com
# List any related terraform modules that this module may be used with or that this module depends on.
related:
- name: terraform-aws-ecs-codepipeline
description: Terraform module for CI/CD with AWS Code Pipeline and Code Build for ECS
url: https://github.com/cloudposse/terraform-aws-ecs-codepipeline
- name: terraform-aws-ecs-events
description: Provides a standard set of ECS events that notify an SNS topic
url: https://github.com/cloudposse/terraform-aws-ecs-events
- name: terraform-aws-ecs-cloudwatch-autoscaling
description: Terraform module to autoscale ECS Service based on CloudWatch metrics
url: https://github.com/cloudposse/terraform-aws-ecs-cloudwatch-autoscaling
- name: terraform-aws-ecs-container-definition
description: Terraform module to generate well-formed JSON documents (container definitions) that are passed to the aws_ecs_task_definition Terraform resource
url: https://github.com/cloudposse/terraform-aws-ecs-container-definition
- name: terraform-aws-ecs-launch-template
description: Terraform module for generating an AWS Launch Template for ECS that handles draining on Spot Termination Requests
url: https://github.com/cloudposse/terraform-aws-ecs-launch-template
- name: terraform-aws-ecs-web-app
description: Terraform module that implements a web app on ECS and supporting AWS resources
url: https://github.com/cloudposse/terraform-aws-ecs-web-app
- name: terraform-aws-ecs-spot-fleet
description: Terraform module to create a diversified spot fleet for ECS clusters
url: https://github.com/cloudposse/terraform-aws-ecs-spot-fleet
- name: terraform-aws-ecs-cloudwatch-sns-alarms
description: Terraform module to create CloudWatch Alarms on ECS Service level metrics
url: https://github.com/cloudposse/terraform-aws-ecs-cloudwatch-sns-alarms
- name: terraform-aws-ecs-alb-service-task
description: Terraform module which implements an ECS service which exposes a web service via ALB
url: https://github.com/cloudposse/terraform-aws-ecs-alb-service-task
description: Terraform module to generate well-formed JSON documents that are passed to the `aws_ecs_task_definition` Terraform resource as [container definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definitions).
usage: |-
This module is meant to be used as output only, meaning it will be used to create outputs which are consumed as a parameter by Terraform resources or other modules.
Caution: This module, unlike nearly all other Cloud Posse Terraform modules, does not use [terraform-null-label](https://github.com/cloudposse/terraform-null-label/).
Furthermore, it has an input named `environment` which has a completely different meaning than the one in `terraform-null-label`.
Do not call this module with the conventional `context = module.this.context`. See the documentation below for the usage of `environment`.
For complete examples, see
- [multi-port mappings](examples/multi_port_mappings)
- [multi-type env vars](examples/multi_type_env_vars)
- [multiple definitions](examples/multiple_definitions)
- [string env vars](examples/string_env_vars)
For a complete example with automated tests, see [examples/complete](examples/complete) with `bats` and `Terratest` for the example [test](test).
```hcl
module "container_definition" {
source = "cloudposse/ecs-container-definition/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
container_name = "geodesic"
container_image = "cloudposse/geodesic"
}
```
The output of this module can then be used with one of our other modules.
```hcl
module "ecs_alb_service_task" {
source = "cloudposse/ecs-alb-service-task/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"
# ...
container_definition_json = module.container_definition.json_map_encoded_list
# ...
}
```
include:
- docs/targets.md
- docs/terraform.md
contributors: []