Skip to content

Commit

Permalink
Merge pull request #37 from wenzel-felix/bugfix/nomad_token_data_call
Browse files Browse the repository at this point in the history
removed dependency on nomad token file for recurring runs
  • Loading branch information
wenzel-felix authored Mar 2, 2023
2 parents 3d9c937 + 2adf7bb commit 2e15d6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions examples/simple-setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module "hetzner-nomad-consul" {
hetzner_token = var.hetzner_token
}

/* output "server_info" {
output "server_info" {
value = module.hetzner-nomad-consul.server_info
}

Expand All @@ -13,4 +13,4 @@ output "nomad_token" {

output "nomad_address" {
value = module.hetzner-nomad-consul.nomad_address
} */
}
9 changes: 1 addition & 8 deletions output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@ output "server_info" {
}
}

data "local_file" "nomad_token" {
depends_on = [
null_resource.fetch_nomad_token
]
filename = "certs/nomad_token"
}

output "nomad_token" {
value = trimspace(data.local_file.nomad_token.content)
value = fileexists("certs/nomad_token") ? trimspace(file("certs/nomad_token")) : "Could not find nomad token file from initial bootstrap. If this is your initial apply, please create a GitHub issue."
}

output "nomad_address" {
Expand Down

0 comments on commit 2e15d6b

Please sign in to comment.