File tree Expand file tree Collapse file tree 3 files changed +23
-7
lines changed Expand file tree Collapse file tree 3 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ No modules.
157
157
| cloudwatch\_ alarm\_ name | Generic name used for CPU and Memory Cloudwatch Alarms | ` string ` | ` "" ` | no |
158
158
| container\_ definitions | Container definitions provided as valid JSON document. Default uses golang: alpine running a simple hello world. | ` string ` | ` "" ` | no |
159
159
| container\_ image | The image of the container. | ` string ` | ` "golang:alpine" ` | no |
160
- | container\_ volumes | Volumes that containers in your task may use. | ``` list( object({ name = string }) ) `` ` | ` [] ` | no |
160
+ | container\_ volumes | Volumes that containers in your task may use. | ` list ` | ` [] ` | no |
161
161
| ec2\_ create\_ task\_ execution\_ role | Set to true to create ecs task execution role to ECS EC2 Tasks. | ` bool ` | ` false ` | no |
162
162
| ecr\_ repo\_ arns | The ARNs of the ECR repos. By default, allows all repositories. | ` list(string) ` | ``` [ "*" ] ``` | no |
163
163
| ecs\_ cluster | ECS cluster object for this task. | ``` object({ arn = string name = string }) ``` | n/a | yes |
@@ -167,6 +167,7 @@ No modules.
167
167
| ecs\_ subnet\_ ids | Subnet IDs for the ECS tasks. | ` list(string) ` | n/a | yes |
168
168
| ecs\_ use\_ fargate | Whether to use Fargate for the task definition. | ` bool ` | ` false ` | no |
169
169
| ecs\_ vpc\_ id | VPC ID to be used by ECS. | ` string ` | n/a | yes |
170
+ | efs\_ instance\_ id | ID of the EFS instance volume | ` string ` | ` "" ` | no |
170
171
| enable\_ ecs\_ managed\_ tags | Specifies whether to enable Amazon ECS managed tags for the tasks within the service | ` bool ` | ` false ` | no |
171
172
| environment | Environment tag, e.g prod. | ` string ` | n/a | yes |
172
173
| fargate\_ platform\_ version | The platform version on which to run your service. Only applicable when using Fargate launch type. | ` string ` | ` "LATEST" ` | no |
Original file line number Diff line number Diff line change @@ -441,6 +441,21 @@ resource "aws_ecs_task_definition" "main" {
441
441
for_each = var. container_volumes
442
442
content {
443
443
name = volume. value . name
444
+ dynamic "efs_volume_configuration" {
445
+ for_each = try ([volume . value . efs_volume_configuration ], [])
446
+
447
+ content {
448
+ authorization_config {
449
+ access_point_id = try (efs_volume_configuration. value . access_point_id , null )
450
+ iam = try (efs_volume_configuration. value . iam , " ENABLED" )
451
+ }
452
+
453
+ file_system_id = var. efs_instance_id
454
+ root_directory = try (efs_volume_configuration. value . root_directory , " /" )
455
+ transit_encryption = try (efs_volume_configuration. value . transit_encryption , " ENABLED" )
456
+ transit_encryption_port = try (efs_volume_configuration. value . transit_encryption_port , null )
457
+ }
458
+ }
444
459
}
445
460
}
446
461
Original file line number Diff line number Diff line change @@ -209,12 +209,6 @@ variable "lb_target_groups" {
209
209
variable "container_volumes" {
210
210
description = " Volumes that containers in your task may use."
211
211
default = []
212
- type = list (
213
- object ({
214
- name = string
215
- })
216
- )
217
-
218
212
}
219
213
220
214
variable "hello_world_container_ports" {
@@ -269,3 +263,9 @@ variable "ecs_deployment_circuit_breaker" {
269
263
rollback = false
270
264
}
271
265
}
266
+
267
+ variable "efs_instance_id" {
268
+ description = " ID of the EFS instance volume"
269
+ type = string
270
+ default = " "
271
+ }
You can’t perform that action at this time.
0 commit comments