Skip to content

Commit 9da8c6b

Browse files
authored
Merge pull request #2 from umotif-public/fix/docs
fix format and update docs
2 parents 4d1297f + 83948ec commit 9da8c6b

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Module managed by [Marcin Cuber](https://github.com/marcincuber) [LinkedIn](http
6767
| name\_prefix | A prefix used for naming resources. | string | n/a | yes |
6868
| private\_subnet\_ids | A list of private subnets inside the VPC | list(string) | n/a | yes |
6969
| task\_container\_image | The image used to start a container. | string | n/a | yes |
70-
| task\_container\_port | Port that the container exposes. | number | n/a | yes |
70+
| task\_container\_port | The port number on the container that is bound to the user-specified or automatically assigned host port | number | n/a | yes |
7171
| vpc\_id | The VPC ID. | string | n/a | yes |
7272
| container\_name | Optional name for the container to be used instead of name_prefix. | string | `""` | no |
7373
| deployment\_controller\_type | Type of deployment controller. Valid values: CODE_DEPLOY, ECS. | string | `"ECS"` | no |
@@ -76,6 +76,7 @@ Module managed by [Marcin Cuber](https://github.com/marcincuber) [LinkedIn](http
7676
| desired\_count | The number of instances of the task definitions to place and keep running. | number | `"1"` | no |
7777
| 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 | `"300"` | no |
7878
| log\_retention\_in\_days | Number of days the logs will be retained in CloudWatch. | number | `"30"` | no |
79+
| propogate\_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 | `"TASK_DEFINITION"` | no |
7980
| repository\_credentials | name or ARN of a secrets manager secret (arn:aws:secretsmanager:region:aws_account_id:secret:secret_name) | string | `""` | no |
8081
| repository\_credentials\_kms\_key | key id, key ARN, alias name or alias ARN of the key that encrypted the repository credentials | string | `"alias/aws/secretsmanager"` | no |
8182
| service\_registry\_arn | ARN of aws_service_discovery_service resource | string | `""` | no |
@@ -86,6 +87,7 @@ Module managed by [Marcin Cuber](https://github.com/marcincuber) [LinkedIn](http
8687
| task\_container\_protocol | Protocol that the container exposes. | string | `"HTTP"` | no |
8788
| task\_definition\_cpu | Amount of CPU to reserve for the task. | number | `"256"` | no |
8889
| task\_definition\_memory | The soft limit (in MiB) of memory to reserve for the container. | number | `"512"` | no |
90+
| task\_host\_port | The port number on the container instance to reserve for your container. | number | `"0"` | no |
8991

9092
## Outputs
9193

@@ -104,4 +106,4 @@ Module managed by [Marcin Cuber](https://github.com/marcincuber) [LinkedIn](http
104106

105107
## License
106108

107-
See LICENSE for full details.
109+
See LICENSE for full details.

examples/core/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ terraform apply --auto-approve
1919
| name\_prefix | A prefix used for naming resources. | string | n/a | yes |
2020
| private\_subnet\_ids | A list of private subnets inside the VPC | list(string) | n/a | yes |
2121
| task\_container\_image | The image used to start a container. | string | n/a | yes |
22-
| task\_container\_port | Port that the container exposes. | number | n/a | yes |
22+
| task\_container\_port | The port number on the container that is bound to the user-specified or automatically assigned host port | number | n/a | yes |
2323
| vpc\_id | The VPC ID. | string | n/a | yes |
2424
| container\_name | Optional name for the container to be used instead of name_prefix. | string | `""` | no |
2525
| deployment\_controller\_type | Type of deployment controller. Valid values: CODE_DEPLOY, ECS. | string | `"ECS"` | no |
@@ -28,6 +28,7 @@ terraform apply --auto-approve
2828
| desired\_count | The number of instances of the task definitions to place and keep running. | number | `"1"` | no |
2929
| 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 | `"300"` | no |
3030
| log\_retention\_in\_days | Number of days the logs will be retained in CloudWatch. | number | `"30"` | no |
31+
| propogate\_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 | `"TASK_DEFINITION"` | no |
3132
| repository\_credentials | name or ARN of a secrets manager secret (arn:aws:secretsmanager:region:aws_account_id:secret:secret_name) | string | `""` | no |
3233
| repository\_credentials\_kms\_key | key id, key ARN, alias name or alias ARN of the key that encrypted the repository credentials | string | `"alias/aws/secretsmanager"` | no |
3334
| service\_registry\_arn | ARN of aws_service_discovery_service resource | string | `""` | no |
@@ -38,6 +39,7 @@ terraform apply --auto-approve
3839
| task\_container\_protocol | Protocol that the container exposes. | string | `"HTTP"` | no |
3940
| task\_definition\_cpu | Amount of CPU to reserve for the task. | number | `"256"` | no |
4041
| task\_definition\_memory | The soft limit (in MiB) of memory to reserve for the container. | number | `"512"` | no |
42+
| task\_host\_port | The port number on the container instance to reserve for your container. | number | `"0"` | no |
4143

4244
## Outputs
4345

main.tf

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ resource "aws_ecs_task_definition" "task" {
123123
cpu = var.task_definition_cpu
124124
memory = var.task_definition_memory
125125
task_role_arn = aws_iam_role.task.arn
126-
tags = merge(
127-
var.tags,
128-
{
129-
Name = var.container_name != "" ? var.container_name : var.name_prefix
130-
},
126+
tags = merge(
127+
var.tags,
128+
{
129+
Name = var.container_name != "" ? var.container_name : var.name_prefix
130+
},
131131
)
132-
container_definitions = <<EOF
132+
container_definitions = <<EOF
133133
[{
134134
"name": "${var.container_name != "" ? var.container_name : var.name_prefix}",
135135
"image": "${var.task_container_image}",
@@ -198,10 +198,10 @@ resource "aws_ecs_service" "service" {
198198
}
199199

200200
tags = merge(
201-
var.tags,
202-
{
203-
Name = "${var.name_prefix}-service"
204-
},
201+
var.tags,
202+
{
203+
Name = "${var.name_prefix}-service"
204+
},
205205
)
206206
}
207207

0 commit comments

Comments
 (0)