-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
29 lines (27 loc) · 1.07 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
locals {
upgrade_cmd = templatefile("${path.module}/provision_script.tpl", {
path = path.module
target_version = var.target_version
agentless_gws = jsonencode(var.agentless_gws)
dsf_hubs = jsonencode(var.dsf_hubs)
connection_timeout = var.connection_timeout
test_connection = var.test_connection
run_preflight_validations = var.run_preflight_validations
run_upgrade = var.run_upgrade
run_postflight_validations = var.run_postflight_validations
# clean_old_deployments = var.clean_old_deployments
stop_on_failure = var.stop_on_failure
tarball_location = jsonencode(var.tarball_location)
ignore_healthcheck_warning = var.ignore_healthcheck_warnings
ignore_healthcheck_checks = var.ignore_healthcheck_checks
})
}
resource "null_resource" "upgrade_cmd" {
provisioner "local-exec" {
command = local.upgrade_cmd
interpreter = ["bash", "-c"]
}
triggers = {
command = local.upgrade_cmd
}
}