-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathlocals.tf
86 lines (79 loc) · 1.75 KB
/
locals.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# Local variables and conditionals
# --------------------------------
locals {
# TFE Architecture
# ----------------
disk_mode = var.operational_mode == "disk"
# Network
# -------
network = try(
module.network[0],
{
bastion_subnet = {
id = var.network_bastion_subnet_id
}
database_private_dns_zone = {
id = var.network_database_private_dns_zone_id
}
database_subnet = {
id = var.network_database_subnet_id
}
frontend_subnet = {
id = var.network_frontend_subnet_id
}
private_subnet = {
id = var.network_private_subnet_id
}
redis_subnet = {
id = var.network_redis_subnet_id
}
}
)
# Redis
# -----
redis = try(
module.redis[0].redis_cache,
{
hostname = null
primary_access_key = null
}
)
# User Data
# ---------
no_proxy = concat([
"127.0.0.1",
"localhost",
"169.254.169.254",
".azure.com",
".windows.net",
".microsoft.com",
module.load_balancer.fqdn,
var.network_cidr,
], var.no_proxy)
trusted_proxies = concat(
var.trusted_proxies,
[var.network_frontend_subnet_cidr]
)
database = try(
module.database[0],
{
name = null
address = null
server = {
administrator_login = null
administrator_password = null
}
}
)
object_storage = try(
module.object_storage[0],
{
storage_account_key = null
storage_account_name = null
storage_account_container_name = null
storage_account_primary_blob_connection_string = null
}
)
}