From b80040308c1b3f67130d6b6a4d025a90751f97d4 Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Sun, 16 Jul 2023 13:31:24 +0200 Subject: [PATCH] add version constraints for providers --- README.md | 11 +++++++---- main.tf | 13 +++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 728efcf..53c6c89 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,21 @@ terraform-nomad-base ========= -A brief description of the role goes here. +Terraform module to deploy nomad jobs. Optionally, this module can deploy csi volumes, consul kv, and consul intentions associated to the job(s). ## Requirements -No requirements. +| Name | Version | +|------|---------| +| [consul](#requirement\_consul) | >= 2.17.0 | +| [nomad](#requirement\_nomad) | >= 1.4.20, < 2.0.0 | ## Providers | Name | Version | |------|---------| -| [consul](#provider\_consul) | n/a | -| [nomad](#provider\_nomad) | n/a | +| [consul](#provider\_consul) | >= 2.17.0 | +| [nomad](#provider\_nomad) | >= 1.4.20, < 2.0.0 | ## Modules diff --git a/main.tf b/main.tf index b61b9e3..c215ba3 100644 --- a/main.tf +++ b/main.tf @@ -1,4 +1,17 @@ # main file for terraform-nomad-base +terraform { + required_providers { + consul = { + source = "hashicorp/consul" + version = ">= 2.17.0" + } + nomad = { + source = "hashicorp/nomad" + version = ">= 1.4.20, < 2.0.0" + } + } +} + resource "nomad_job" "this" { for_each = var.jobs depends_on = [