forked from idealo/terraform-aws-mwaa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
57 lines (46 loc) · 1.27 KB
/
main.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
resource "aws_mwaa_environment" "this" {
airflow_configuration_options = var.airflow_configuration_options
execution_role_arn = aws_iam_role.this.arn
name = var.environment_name
max_workers = var.max_workers
min_workers = var.min_workers
environment_class = var.environment_class
airflow_version = var.airflow_version
source_bucket_arn = var.source_bucket_arn
dag_s3_path = var.dag_s3_path
plugins_s3_path = var.plugins_s3_path
plugins_s3_object_version = var.plugins_s3_object_version
requirements_s3_path = var.requirements_s3_path
requirements_s3_object_version = var.requirements_s3_object_version
logging_configuration {
dag_processing_logs {
enabled = true
log_level = "WARNING"
}
scheduler_logs {
enabled = true
log_level = "WARNING"
}
task_logs {
enabled = true
log_level = "INFO"
}
webserver_logs {
enabled = true
log_level = "WARNING"
}
worker_logs {
enabled = true
log_level = "WARNING"
}
}
network_configuration {
security_group_ids = [
aws_security_group.this.id]
subnet_ids = aws_subnet.private[*].id
}
webserver_access_mode = var.webserver_access_mode
tags = merge({
Name = "mwaa-${var.environment_name}"
}, var.tags)
}