Skip to content

Commit 9fab57f

Browse files
author
Abdul Wahid
authored
Add entrypoint to task definition parameters (#61)
* Add entrypoint to task definition parameters * chore: Update documentation
1 parent 73fbe84 commit 9fab57f

File tree

8 files changed

+26
-12
lines changed

8 files changed

+26
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ terraform.tfstate
66
*.tfstate*
77
terraform.tfvars
88
*.terraform.lock.hcl
9+
*.vscode*

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.2.0
3+
rev: v4.3.0
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=500']
@@ -18,7 +18,7 @@ repos:
1818
args: ['--allow-missing-credentials']
1919
- id: trailing-whitespace
2020
- repo: https://github.com/antonbabenko/pre-commit-terraform
21-
rev: v1.71.0
21+
rev: v1.74.1
2222
hooks:
2323
- id: terraform_fmt
2424
- id: terraform_docs

CHANGELOG.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ All notable changes to this project will be documented in this file.
55
<a name="unreleased"></a>
66
## [Unreleased]
77

8-
- add GetBucketLocation permissions to iam policy
9-
- add iam permissions
10-
- Add support for environment files
8+
9+
10+
<a name="6.5.0"></a>
11+
## [6.5.0] - 2022-05-12
12+
13+
- Add support for EnvironmentFiles in container definition ([#60](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/60))
1114
- Allow option to customise run_time platform ([#56](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/56))
1215
- Enable containerDefinitions portMappings to use target_groups container_ports ([#59](https://github.com/umotif-public/terraform-aws-ecs-fargate/issues/59))
1316

@@ -235,7 +238,8 @@ All notable changes to this project will be documented in this file.
235238
- Initial commit
236239

237240

238-
[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.4.2...HEAD
241+
[Unreleased]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.5.0...HEAD
242+
[6.5.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.4.2...6.5.0
239243
[6.4.2]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.4.1...6.4.2
240244
[6.4.1]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.4.0...6.4.1
241245
[6.4.0]: https://github.com/umotif-public/terraform-aws-ecs-fargate/compare/6.3.0...6.4.0

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Terraform module to create [AWS ECS FARGATE](https://aws.amazon.com/fargate/) se
66

77
## Terraform versions
88

9-
Terraform 0.13. Pin module version to `~> v6.0`. Submit pull-requests to `master` branch.
9+
Terraform 1.0.11. Pin module version to `~> v6.0`. Submit pull-requests to `master` branch.
1010

1111
## Usage
1212

@@ -77,14 +77,14 @@ module "ecs-fargate" {
7777

7878
## Authors
7979

80-
Module managed by [Abdul Wahid](https://github.com/Ohid25) [LinkedIn](https://www.linkedin.com/in/abdulwahid/).
80+
Module managed by [uMotif](https://github.com/umotif-public/).
8181

8282
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
8383
## Requirements
8484

8585
| Name | Version |
8686
|------|---------|
87-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.7 |
87+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.11 |
8888
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.0.0 |
8989

9090
## Providers
@@ -160,6 +160,7 @@ No modules.
160160
| <a name="input_task_container_assign_public_ip"></a> [task\_container\_assign\_public\_ip](#input\_task\_container\_assign\_public\_ip) | Assigned public IP to the container. | `bool` | `false` | no |
161161
| <a name="input_task_container_command"></a> [task\_container\_command](#input\_task\_container\_command) | The command that is passed to the container. | `list(string)` | `[]` | no |
162162
| <a name="input_task_container_cpu"></a> [task\_container\_cpu](#input\_task\_container\_cpu) | Amount of CPU to reserve for the container. | `number` | `null` | no |
163+
| <a name="input_task_container_entrypoint"></a> [task\_container\_entrypoint](#input\_task\_container\_entrypoint) | The entrypoint that is passed to the container. | `list(string)` | `[]` | no |
163164
| <a name="input_task_container_environment"></a> [task\_container\_environment](#input\_task\_container\_environment) | The environment variables to pass to a container. | `map(string)` | `{}` | no |
164165
| <a name="input_task_container_environment_files"></a> [task\_container\_environment\_files](#input\_task\_container\_environment\_files) | The environment variable files (s3 object arns) to pass to a container. Files must use .env file extension. | `list(string)` | `[]` | no |
165166
| <a name="input_task_container_image"></a> [task\_container\_image](#input\_task\_container\_image) | The image used to start a container. | `string` | n/a | yes |

examples/core/main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module "fargate" {
9393
private_subnet_ids = data.aws_subnets.all.ids
9494
cluster_id = aws_ecs_cluster.cluster.id
9595

96-
wait_for_steady_state = true
96+
wait_for_steady_state = false
9797

9898
platform_version = "1.4.0" # defaults to LATEST
9999

@@ -127,7 +127,6 @@ module "fargate" {
127127
# repository_credentials = aws_secretsmanager_secret.task_credentials.arn
128128
}
129129

130-
131130
resource "aws_security_group" "allow_sg_test" {
132131
name = "allow_sg_test"
133132
description = "Allow sg inbound traffic"

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ resource "aws_ecs_task_definition" "task" {
225225
},
226226
%{~endif}
227227
"command": ${jsonencode(var.task_container_command)},
228+
%{if var.task_container_entrypoint != ""~}
229+
"entryPoint": ${jsonencode(var.task_container_entrypoint)},
230+
%{~endif}
228231
%{if var.task_container_working_directory != ""~}
229232
"workingDirectory": ${var.task_container_working_directory},
230233
%{~endif}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ variable "task_container_command" {
9393
type = list(string)
9494
}
9595

96+
variable "task_container_entrypoint" {
97+
description = "The entrypoint that is passed to the container."
98+
default = []
99+
type = list(string)
100+
}
101+
96102
variable "task_container_environment" {
97103
description = "The environment variables to pass to a container."
98104
default = {}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 0.13.7"
2+
required_version = ">= 1.0.11"
33

44
required_providers {
55
aws = ">= 4.0.0"

0 commit comments

Comments
 (0)