-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
69 lines (65 loc) · 2.21 KB
/
main.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
locals {
instance_count = var.instance_count # length(var.ips)
services = {
"srb3/guacamole-client" = {
"channel" = var.guacamole_client_channel,
"binding_mode" = "relaxed"
"bind" = "webproxy:guacamole-webserver.default"
"user_toml_config" = {
"users" = var.guacamole_client_connection_config,
"tomcat" = {
"port" = var.guacamole_client_tomcat_port,
"listen_address" = var.guacamole_client_tomcat_listen_address
}
}
},
"srb3/guacamole-webserver" = {
"channel" = var.guacamole_webserver_channel,
"bind" = "guacamole:guacamole-client.default"
"user_toml_config" = {
"server_hostname" = var.guacamole_webserver_hostname,
"ssl" = {
"crt" = var.guacamole_webserver_ssl_crt
"key" = var.guacamole_webserver_ssl_key
}
}
}
}
}
# we can't use effortless package at the moment due to pathing issues
# so calling the cookbook through policyfile bootstrap
module "guacd_build" {
source = "srb3/policyfile/chef"
version = "0.13.0"
ips = var.ips
instance_count = local.instance_count
cookbooks = var.cookbooks
policyfile_name = var.policyfile_name
runlist = var.runlist
user_name = var.user_name
user_pass = var.user_pass
user_private_key = var.user_private_key
}
module "habitat_install" {
source = "srb3/habitat/chef"
version = "0.13.0"
ips = var.ips
instance_count = local.instance_count
user_name = var.user_name
user_pass = var.user_pass
user_private_key = var.user_private_key
user_names = var.user_names
user_passes = var.user_passes
user_private_keys = var.user_private_keys
hab_services = local.services
}
## the following was removed from the services list due to
# issues with getting chef effortless packages to run
# services = {
# "srb3/effortless-guacd" = {
# "channel" = var.effortless_guacd_channel,
# "user_toml_config" = {
# "interval" = var.effortless_guacd_interval,
# "splay" = var.effortless_guacd_splay
# }
# },