-
Notifications
You must be signed in to change notification settings - Fork 5
/
api.tf
68 lines (59 loc) · 2.68 KB
/
api.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
data "heroku_team" "dandi" {
name = "dandi"
}
module "api" {
source = "girder/girder4/heroku"
version = "0.13.0"
project_slug = "dandi-api"
heroku_team_name = data.heroku_team.dandi.name
route53_zone_id = aws_route53_zone.dandi.zone_id
subdomain_name = "api"
heroku_web_dyno_size = "standard-2x"
heroku_worker_dyno_size = "standard-2x"
heroku_postgresql_plan = "standard-0"
heroku_cloudamqp_plan = "squirrel-1"
heroku_papertrail_plan = "liatorp"
heroku_web_dyno_quantity = 3
heroku_worker_dyno_quantity = 1
django_default_from_email = "admin@api.dandiarchive.org"
django_cors_origin_whitelist = ["https://dandiarchive.org"]
django_cors_origin_regex_whitelist = ["^https:\\/\\/[0-9a-z\\-]+--gui-dandiarchive-org\\.netlify\\.app$"]
additional_django_vars = {
DJANGO_CONFIGURATION = "HerokuProductionConfiguration"
DJANGO_DANDI_DANDISETS_BUCKET_NAME = module.sponsored_dandiset_bucket.bucket_name
DJANGO_DANDI_DANDISETS_BUCKET_PREFIX = ""
DJANGO_DANDI_DANDISETS_EMBARGO_BUCKET_NAME = module.sponsored_embargo_bucket.bucket_name
DJANGO_DANDI_DANDISETS_EMBARGO_BUCKET_PREFIX = ""
DJANGO_DANDI_DANDISETS_LOG_BUCKET_NAME = module.sponsored_dandiset_bucket.log_bucket_name
DJANGO_DANDI_DANDISETS_EMBARGO_LOG_BUCKET_NAME = module.sponsored_embargo_bucket.log_bucket_name
DJANGO_DANDI_DOI_API_URL = "https://api.datacite.org/dois"
DJANGO_DANDI_DOI_API_USER = "dartlib.dandi"
DJANGO_DANDI_DOI_API_PREFIX = "10.48324"
DJANGO_DANDI_DOI_PUBLISH = "true"
DJANGO_SENTRY_DSN = data.sentry_key.this.dsn_public
DJANGO_SENTRY_ENVIRONMENT = "production"
DJANGO_CELERY_WORKER_CONCURRENCY = "4"
DJANGO_DANDI_WEB_APP_URL = "https://dandiarchive.org"
DJANGO_DANDI_API_URL = "https://api.dandiarchive.org"
DJANGO_DANDI_JUPYTERHUB_URL = "https://hub.dandiarchive.org/"
DJANGO_DANDI_DEV_EMAIL = var.dev_email
}
additional_sensitive_django_vars = {
DJANGO_DANDI_DOI_API_PASSWORD = var.doi_api_password
}
}
resource "heroku_formation" "api_checksum_worker" {
app_id = module.api.heroku_app_id
type = "checksum-worker"
size = "standard-2x"
quantity = 1
}
resource "heroku_formation" "api_analytics_worker" {
app_id = module.api.heroku_app_id
type = "analytics-worker"
size = "standard-1x"
quantity = 1
}
data "aws_iam_user" "api" {
user_name = module.api.heroku_iam_user_id
}