Skip to content

Latest commit

 

History

History
109 lines (85 loc) · 2.02 KB

nomad_sentinel_policy.md

File metadata and controls

109 lines (85 loc) · 2.02 KB

nomad_sentinel_policy

back

Index

Terraform

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

top

Example Usage

module "nomad_sentinel_policy" {
  source = "./modules/nomad/r/nomad_sentinel_policy"

  # description - (optional) is a type of string
  description = null
  # enforcement_level - (required) is a type of string
  enforcement_level = null
  # name - (required) is a type of string
  name = null
  # policy - (required) is a type of string
  policy = null
  # scope - (required) is a type of string
  scope = null
}

top

Variables

variable "description" {
  description = "(optional) - Description for this policy."
  type        = string
  default     = null
}

variable "enforcement_level" {
  description = "(required) - Specifies the enforcement level of the policy."
  type        = string
}

variable "name" {
  description = "(required) - Unique name for this policy."
  type        = string
}

variable "policy" {
  description = "(required) - The Sentinel policy."
  type        = string
}

variable "scope" {
  description = "(required) - Specifies the scope for this policy. Only 'submit-job' is currently supported."
  type        = string
}

top

Resource

resource "nomad_sentinel_policy" "this" {
  # description - (optional) is a type of string
  description = var.description
  # enforcement_level - (required) is a type of string
  enforcement_level = var.enforcement_level
  # name - (required) is a type of string
  name = var.name
  # policy - (required) is a type of string
  policy = var.policy
  # scope - (required) is a type of string
  scope = var.scope
}

top

Outputs

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

output "this" {
  value = nomad_sentinel_policy.this
}

top