-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfleet.tf
110 lines (95 loc) · 2.37 KB
/
fleet.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
variable "enable_fleet" {
default = true
}
output "enable_fleet" {
value = "${var.enable_fleet}"
}
variable "fleet_verbosity" {
default = ""
}
output "fleet_verbosity" {
value = "${var.fleet_verbosity}"
}
variable "fleet_etcd_servers" {
default = ""
}
output "fleet_etcd_servers" {
value = "${var.fleet_etcd_servers}"
}
variable "fleet_etcd_request_timeout" {
default = ""
}
output "fleet_etcd_request_timeout" {
value = "${var.fleet_etcd_request_timeout}"
}
variable "fleet_etcd_cafile" {
default = ""
}
output "fleet_etcd_cafile" {
value = "${var.fleet_etcd_cafile}"
}
variable "fleet_etcd_keyfile" {
default = ""
}
output "fleet_etcd_keyfile" {
value = "${var.fleet_etcd_keyfile}"
}
variable "fleet_etcd_certfile" {
default = ""
}
output "fleet_etcd_certfile" {
value = "${var.fleet_etcd_certfile}"
}
variable "fleet_etcd_key_prefix" {
default = ""
}
output "fleet_etcd_key_prefix" {
value = "${var.fleet_etcd_key_prefix}"
}
variable "fleet_public_ip" {
default = "var!public_ipv4"
}
output "fleet_public_ip" {
value = "${var.fleet_public_ip}"
}
variable "fleet_metadata" {
default = ""
}
output "fleet_metadata" {
value = "${var.fleet_metadata}"
}
variable "fleet_agent_ttl" {
default = ""
}
output "fleet_agent_ttl" {
value = "${var.fleet_agent_ttl}"
}
variable "fleet_engine_reconcile_interval" {
default = ""
}
output "fleet_engine_reconcile_interval" {
value = "${var.fleet_engine_reconcile_interval}"
}
data "template_file" "fleet_unit" {
template = "${file("${path.module}/templates/enabled-unit.yml")}"
vars {
service = "fleet"
enabled = "${var.enable_fleet}"
drop-ins = ""
}
}
data "template_file" "fleet" {
template = "${file("${path.module}/templates/fleet.yml")}"
vars {
verbosity = "${var.fleet_verbosity}"
etcd_servers = "${var.fleet_etcd_servers}"
etcd_request_timeout = "${var.fleet_etcd_request_timeout}"
etcd_keyfile = "${coalesce(var.fleet_etcd_keyfile, var.etcd2_key-file)}"
etcd_certfile = "${coalesce(var.fleet_etcd_certfile, var.etcd2_cert-file)}"
etcd_key_prefix = "${var.fleet_etcd_key_prefix}"
public_ip = "${var.fleet_public_ip}"
metadata = "${var.fleet_metadata}"
agent_ttl = "${var.fleet_agent_ttl}"
engine_reconcile_interval = "${var.fleet_engine_reconcile_interval}"
}
}