Files
nomad/enos/modules/fetch_artifactory/main.tf
Juana De La Cuesta 3861c40220 func: add initial enos skeleton (#24787)
* func: add initial enos skeleton

* style: add headers

* func: change the variables input to a map of objects to simplify the workloads creation

* style: formating

* Add tests for servers and clients

* style: separate the tests in diferent scripts

* style: add missing headers

* func: add tests for allocs

* style: improve output

* func: add step to copy remote upgrade version

* style: hcl formatting

* fix: remove the terraform nomad provider

* fix: Add clean token to remove extra new line added in provision

* fix: Add clean token to remove extra new line added in provision

* fix: Add clean token to remove extra new line added in provision

* fix: add missing license headers

* style: hcl fmt

* style: rename variables and fix format

* func: remove the template step on the workloads module and chop the noamd token output on the provide module

* fix: correct the jobspec path on the workloads module

* fix: add missing variable definitions on job specs for workloads

* style: formatting

* fix: rename variable in health test
2025-01-30 16:37:55 +01:00

35 lines
838 B
HCL

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
terraform {
required_providers {
enos = {
source = "registry.terraform.io/hashicorp-forge/enos"
}
}
}
data "enos_artifactory_item" "nomad" {
username = var.artifactory_username
token = var.artifactory_token
host = var.artifactory_host
repo = var.artifactory_repo
path = local.path
name = local.artifact_name
properties = tomap({
"product-name" = var.edition == "ce" ? "nomad" : "nomad-enterprise"
})
}
resource "enos_local_exec" "install_binary" {
environment = {
URL = data.enos_artifactory_item.nomad.results[0].url
BINARY_PATH = var.binary_path
TOKEN = var.artifactory_token
LOCAL_ZIP = local.artifact_zip
}
scripts = [abspath("${path.module}/scripts/install.sh")]
}