Compare commits
1 Commits
main
...
post-boots
Author | SHA1 | Date | |
---|---|---|---|
2466f98468 |
@ -24,15 +24,20 @@ locals {
|
|||||||
vault_node_address = "http://${local.vault_node.node_address}:${local.vault_node.port}"
|
vault_node_address = "http://${local.vault_node.node_address}:${local.vault_node.port}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure the Nomad provider
|
|
||||||
provider "nomad" {
|
|
||||||
address = local.nomad_node_address
|
|
||||||
secret_id = var.nomad_secret_id
|
|
||||||
region = "global"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Configure the Vault provider
|
# Configure the Vault provider
|
||||||
provider "vault" {
|
provider "vault" {
|
||||||
address = local.vault_node_address
|
address = length(var.vault_address) == 0 ? local.vault_node_address : var.vault_address
|
||||||
token = var.vault_token
|
token = var.vault_token
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data "vault_nomad_access_token" "admin" {
|
||||||
|
backend = "nomad"
|
||||||
|
role = "admin"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Configure the Nomad provider
|
||||||
|
provider "nomad" {
|
||||||
|
address = length(var.nomad_address) == 0 ? local.nomad_node_address : var.nomad_address
|
||||||
|
secret_id = length(var.nomad_secret_id) == 0 ? data.vault_nomad_access_token.admin.secret_id : var.nomad_secret_id
|
||||||
|
region = "global"
|
||||||
|
}
|
||||||
|
@ -3,6 +3,16 @@ variable "consul_address" {
|
|||||||
default = "http://n1.thefij:8500"
|
default = "http://n1.thefij:8500"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "vault_address" {
|
||||||
|
type = string
|
||||||
|
default = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "nomad_address" {
|
||||||
|
type = string
|
||||||
|
default = ""
|
||||||
|
}
|
||||||
|
|
||||||
variable "base_hostname" {
|
variable "base_hostname" {
|
||||||
type = string
|
type = string
|
||||||
description = "Base hostname to serve content from"
|
description = "Base hostname to serve content from"
|
||||||
|
Loading…
Reference in New Issue
Block a user