Skip to content

Latest commit

 

History

History
88 lines (66 loc) · 1.46 KB

nomad_datacenters.md

File metadata and controls

88 lines (66 loc) · 1.46 KB

nomad_datacenters

back

Index

Terraform

terraform {
  required_providers {
    nomad = ">= 1.4.14"
  }
}

top

Example Usage

module "nomad_datacenters" {
  source = "./modules/nomad/d/nomad_datacenters"

  # ignore_down_nodes - (optional) is a type of bool
  ignore_down_nodes = null
  # prefix - (optional) is a type of string
  prefix = null
}

top

Variables

variable "ignore_down_nodes" {
  description = "(optional) - If enabled, this flag will ignore nodes that are down when listing datacenters."
  type        = bool
  default     = null
}

variable "prefix" {
  description = "(optional) - Prefix value used for filtering results."
  type        = string
  default     = null
}

top

Datasource

data "nomad_datacenters" "this" {
  # ignore_down_nodes - (optional) is a type of bool
  ignore_down_nodes = var.ignore_down_nodes
  # prefix - (optional) is a type of string
  prefix = var.prefix
}

top

Outputs

output "datacenters" {
  description = "returns a list of string"
  value       = data.nomad_datacenters.this.datacenters
}

output "id" {
  description = "returns a string"
  value       = data.nomad_datacenters.this.id
}

output "this" {
  value = nomad_datacenters.this
}

top