@@ -6,19 +6,42 @@ variable "batch_environment" {
66
77 default = [
88 for pair in flatten ([for line in split (" \n " , templatefile (" $api-configuration/environment.tpl" , {
9- django_secret_key = var . django_secret_key
10- database_host = aws_db_instance . postgres_db . address
11- database_port = aws_db_instance . postgres_db . port
12- database_user = aws_db_instance . postgres_db . username
13- database_password = var . database_password
14- aws_region = var . region
15- aws_s3_bucket_name = aws_s3_bucket . scpca_portal_bucket . id
16- sentry_dsn = var . sentry_dsn
17- sentry_env = var . sentry_env
9+ django_secret_key = var . django_secret_key
10+ database_host = aws_db_instance . postgres_db . address
11+ database_port = aws_db_instance . postgres_db . port
12+ database_user = aws_db_instance . postgres_db . username
13+ database_password = var . database_password
14+ aws_region = var . region
15+ aws_s3_bucket_name = aws_s3_bucket . scpca_portal_bucket . id
16+ sentry_dsn = var . sentry_dsn
17+ sentry_env = var . sentry_env
1818 })) : split (" =" , line)]) :
1919 {
2020 name = pair[0 ]
2121 value = pair[1 ]
2222 }
2323 ]
2424}
25+
26+ variable "batch_image" {
27+ type = string
28+ default = " ${ var . dockerhub_repo } /scpca_portal_api:latest"
29+ }
30+
31+ variable "batch_resource_requirements" {
32+ type = list (object ({
33+ type = string
34+ value = string
35+ }))
36+ # requirements match api requirements, which uses a t2.medium (2 vcpus and 4.0 GB of RAM)
37+ default = [
38+ {
39+ type = " VCPU"
40+ value = " 2.0"
41+ },
42+ {
43+ type = " MEMORY"
44+ value = " 4096"
45+ }
46+ ]
47+ }
0 commit comments