@@ -22,10 +22,12 @@ resource "aws_ecs_task_definition" "task_definition" {
2222 family = var. name
2323 requires_compatibilities = [" FARGATE" ]
2424 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
2931
3032 container_definitions = jsonencode ([
3133 {
@@ -39,9 +41,11 @@ resource "aws_ecs_task_definition" "task_definition" {
3941 valueFrom = var.secure_api_token_secret_name
4042 }
4143 ]
42- portMappings = [{
43- containerPort = 5000
44- }]
44+ portMappings = [
45+ {
46+ containerPort = 5000
47+ }
48+ ]
4549 logConfiguration = {
4650 logDriver = " awslogs"
4751 options = {
@@ -64,7 +68,7 @@ locals {
6468 value = tostring (local. verify_ssl )
6569 },
6670 {
67- name = " telemetryDeploymentMethod "
71+ name = " TELEMETRY_DEPLOYMENT_METHOD "
6872 value = " terraform_aws_ecs_${ local . suffix_org } "
6973 },
7074 {
@@ -75,9 +79,13 @@ locals {
7579 name = " SECURE_URL" ,
7680 value = data.sysdig_secure_connection.current.secure_url
7781 }
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+ ])
8290 )
8391}
0 commit comments