@@ -22,10 +22,12 @@ resource "aws_ecs_task_definition" "task_definition" {
22
22
family = var. name
23
23
requires_compatibilities = [" FARGATE" ]
24
24
network_mode = " awsvpc"
25
- execution_role_arn = aws_iam_role. execution . arn # ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume
26
- task_role_arn = local. ecs_task_role_arn # ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
27
- cpu = var. ecs_task_cpu
28
- memory = var. ecs_task_memory
25
+ execution_role_arn = aws_iam_role. execution . arn
26
+ # ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume
27
+ task_role_arn = local. ecs_task_role_arn
28
+ # ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
29
+ cpu = var. ecs_task_cpu
30
+ memory = var. ecs_task_memory
29
31
30
32
container_definitions = jsonencode ([
31
33
{
@@ -39,9 +41,11 @@ resource "aws_ecs_task_definition" "task_definition" {
39
41
valueFrom = var.secure_api_token_secret_name
40
42
}
41
43
]
42
- portMappings = [{
43
- containerPort = 5000
44
- }]
44
+ portMappings = [
45
+ {
46
+ containerPort = 5000
47
+ }
48
+ ]
45
49
logConfiguration = {
46
50
logDriver = " awslogs"
47
51
options = {
@@ -64,7 +68,7 @@ locals {
64
68
value = tostring (local. verify_ssl )
65
69
},
66
70
{
67
- name = " telemetryDeploymentMethod "
71
+ name = " TELEMETRY_DEPLOYMENT_METHOD "
68
72
value = " terraform_aws_ecs_${ local . suffix_org } "
69
73
},
70
74
{
@@ -75,9 +79,13 @@ locals {
75
79
name = " SECURE_URL" ,
76
80
value = data.sysdig_secure_connection.current.secure_url
77
81
}
78
- ], flatten ([for env_key , env_value in var . extra_env_vars : [{
79
- name = env_key,
80
- value = env_value
81
- }]])
82
+ ], flatten ([
83
+ for env_key , env_value in var . extra_env_vars : [
84
+ {
85
+ name = env_key,
86
+ value = env_value
87
+ }
88
+ ]
89
+ ])
82
90
)
83
91
}
0 commit comments