-
Notifications
You must be signed in to change notification settings - Fork 2
/
aws_container_definitions.tf
41 lines (39 loc) · 1.7 KB
/
aws_container_definitions.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
# ------------------------------------------------------------------------------
# Container Definitions
# ------------------------------------------------------------------------------
locals {
# bitcoin
bitcoin_def = templatefile("${path.module}/templates/container-definition-bitcoin.json", {
CONTAINER_NAME = local.bitcoin_service_name
ESSENTIAL = var.bitcoin_is_essential
IMAGE_URL = var.bitcoin_image_registry_url
IMAGE_VERSION = var.bitcoin_image_version
CONTAINER_PORT = var.bitcoin_container_port
MEMORY = var.bitcoin_container_memory_alloc
CPU = var.bitcoin_container_cpu_alloc
CLUSTER_NAME = local.cluster_name
AWS_REGION = var.aws_region
VOLUME_NAME = var.bitcoin_ebs_volume_name
RPC_AUTH = var.bitcoin_rpc_auth
ENV_VARS = jsonencode(concat(
[{ name = "BITCOIN_DATA", value = "${var.bitcoin_data_path}" }]
))
})
# electrs
electrs_def = templatefile("${path.module}/templates/container-definition-electrs.json", {
CONTAINER_NAME = local.electrs_service_name
ESSENTIAL = var.electrs_is_essential
IMAGE_URL = var.electrs_image_registry_url
IMAGE_VERSION = var.electrs_image_version
CONTAINER_PORT = var.electrs_container_port
MEMORY = var.electrs_container_memory_alloc
CPU = var.electrs_container_cpu_alloc
CLUSTER_NAME = local.cluster_name
AWS_REGION = var.aws_region
BITCOIN_VOLUME_NAME = var.bitcoin_ebs_volume_name
ELECTRS_VOLUME_NAME = var.electrs_ebs_volume_name
ENV_VARS = jsonencode(concat(
[{ name = "BITCOIN_DATA", value = "${var.electrs_data_path}" }]
))
})
}