-
Notifications
You must be signed in to change notification settings - Fork 1
/
ecs_rstudio_rv4.tf
71 lines (57 loc) · 2.04 KB
/
ecs_rstudio_rv4.tf
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
resource "aws_ecs_task_definition" "rstudio_rv4" {
family = "${var.prefix}-rstudio-rv4"
container_definitions = templatefile(
"${path.module}/ecs_notebooks_notebook_container_definitions.json", {
container_image = "${aws_ecr_repository.rstudio_rv4.repository_url}:master"
container_name = "${local.notebook_container_name}"
container_cpu = "${local.notebook_container_cpu}"
container_memory = "${local.notebook_container_memory}"
log_group = "${aws_cloudwatch_log_group.notebook.name}"
log_region = "${data.aws_region.aws_region.name}"
sentry_dsn = "${var.sentry_dsn}"
sentry_environment = "${var.sentry_environment}"
metrics_container_image = "${aws_ecr_repository.metrics.repository_url}:master"
s3sync_container_image = "${aws_ecr_repository.s3sync.repository_url}:master"
cloudwatch_namespace = "${var.cloudwatch_namespace}"
cloudwatch_region = "${var.cloudwatch_region}"
home_directory = "/home/rstudio"
}
)
execution_role_arn = aws_iam_role.notebook_task_execution.arn
network_mode = "awsvpc"
cpu = local.notebook_container_cpu
memory = local.notebook_container_memory
requires_compatibilities = ["FARGATE"]
ephemeral_storage {
size_in_gib = 50
}
volume {
name = "home_directory"
}
lifecycle {
ignore_changes = [
"revision",
]
}
}
data "external" "rstudio_rv4_current_tag" {
program = ["${path.module}/task_definition_tag.sh"]
query = {
task_family = "${var.prefix}-rstudio-rv4"
container_name = "${local.notebook_container_name}"
}
}
data "external" "rstudio_rv4_metrics_current_tag" {
program = ["${path.module}/task_definition_tag.sh"]
query = {
task_family = "${var.prefix}-rstudio-rv4"
container_name = "metrics"
}
}
data "external" "rstudio_rv4_s3sync_current_tag" {
program = ["${path.module}/task_definition_tag.sh"]
query = {
task_family = "${var.prefix}-rstudio-rv4"
container_name = "s3sync"
}
}