forked from ExpediaGroup/apiary-lifecycle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-templates.tf
69 lines (58 loc) · 2.54 KB
/
config-templates.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
/**
* Copyright (C) 2019-2021 Expedia, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
*/
data "template_file" "beekeeper_graphite_config" {
template = file("${path.module}/files/beekeeper-graphite-config-segment.json")
vars = {
graphite_enabled = var.graphite_enabled
graphite_host = var.graphite_host
graphite_prefix = var.graphite_prefix
graphite_port = var.graphite_port
}
}
data "template_file" "beekeeper_scheduler_apiary_config" {
template = file("${path.module}/files/beekeeper-scheduler-apiary-config.json")
vars = {
db_endpoint = aws_db_instance.beekeeper.endpoint
db_name = aws_db_instance.beekeeper.name
db_username = aws_db_instance.beekeeper.username
queue = aws_sqs_queue.beekeeper.id
graphite_config = var.graphite_enabled == "false" ? "" : data.template_file.beekeeper_graphite_config.rendered
}
}
data "template_file" "beekeeper_path_cleanup_config" {
template = file("${path.module}/files/beekeeper-path-cleanup-config.json")
vars = {
db_endpoint = aws_db_instance.beekeeper.endpoint
db_name = aws_db_instance.beekeeper.name
db_username = aws_db_instance.beekeeper.username
scheduler_delay_ms = var.scheduler_delay_ms
dry_run_enabled = var.path_cleanup_dry_run_enabled
graphite_config = var.graphite_enabled == "false" ? "" : data.template_file.beekeeper_graphite_config.rendered
}
}
data "template_file" "beekeeper_metadata_cleanup_config" {
template = file("${path.module}/files/beekeeper-metadata-cleanup-config.json")
vars = {
db_endpoint = aws_db_instance.beekeeper.endpoint
db_name = aws_db_instance.beekeeper.name
db_username = aws_db_instance.beekeeper.username
scheduler_delay_ms = var.scheduler_delay_ms
dry_run_enabled = var.metadata_cleanup_dry_run_enabled
metastore_uri = var.metastore_uri
graphite_config = var.graphite_enabled == "false" ? "" : data.template_file.beekeeper_graphite_config.rendered
}
}
data "template_file" "beekeeper_api_config" {
template = file("${path.module}/files/beekeeper-api-config.json")
vars = {
db_endpoint = aws_db_instance.beekeeper.endpoint
db_name = aws_db_instance.beekeeper.name
db_username = aws_db_instance.beekeeper.username
scheduler_delay_ms = var.scheduler_delay_ms
metastore_uri = var.metastore_uri
graphite_config = var.graphite_enabled == "false" ? "" : data.template_file.beekeeper_graphite_config.rendered
}
}