-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcare_celery_beat_ecs_task.tf
More file actions
55 lines (48 loc) · 2.08 KB
/
Copy pathcare_celery_beat_ecs_task.tf
File metadata and controls
55 lines (48 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module "beat_container_definition" {
source = "cloudposse/ecs-container-definition/aws"
version = "0.58.2"
container_name = "ohn-${var.environment}-${var.app}-celery_beat"
container_image = local.image
container_memory = 512
container_memory_reservation = 512
container_cpu = 256
command = ["bash", "./scripts/celery_beat.sh"]
log_configuration = {
logDriver = "awslogs"
options = {
awslogs-region = var.aws_region
awslogs-group = aws_cloudwatch_log_group.care_logs.name
awslogs-stream-prefix = "api"
}
}
environment = local.environment_variables
secrets = local.secret_environment_variables
}
module "beat_service_task" {
source = "cloudposse/ecs-alb-service-task/aws"
version = "0.67.1"
namespace = "ohn"
stage = var.environment
name = "${var.app}-celery_beat"
alb_security_group = module.backend_alb.security_group_id
container_definition_json = module.beat_container_definition.json_map_encoded_list
ecs_cluster_arn = module.ecs_cluster.cluster_arn
launch_type = "FARGATE"
vpc_id = module.vpc.vpc_id
security_group_ids = [aws_security_group.allow_database.id]
subnet_ids = module.vpc.private_subnets
ecs_load_balancers = []
tags = local.tags
ignore_changes_task_definition = false
network_mode = "awsvpc"
exec_enabled = true
# health_check_grace_period_seconds = 100
deployment_minimum_healthy_percent = 100
deployment_maximum_percent = 200
desired_count = 1
task_memory = 512
task_cpu = 256
runtime_platform = [{ cpu_architecture : "ARM64" }]
task_exec_policy_arns = [aws_iam_policy.ecs_policy.arn]
task_policy_arns = [aws_iam_policy.ecs_policy.arn]
}