Files
nomad/enos/modules/run_workloads/scripts/configure-variables-acls.sh
Tim Gross 61bbff9c24 upgrade testing: Variables, Workload Identity, and Task API (#25229)
Add an upgrade test workload for that continuously writes to a Nomad
Variable. In order to run this workload, we'll need to deploy a
Workload-Associated ACL policy. So this extends the `run_workloads` module to
allow for a "pre script" to be run before a given job is deployed. We can use
that as a model for other test workloads.

Ref: https://hashicorp.atlassian.net/browse/NET-12217
2025-03-11 08:48:40 -04:00

18 lines
331 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
set -euo pipefail
nomad acl policy apply \
-namespace default -job writes-vars \
writes-vars-policy - <<EOF
namespace "default" {
variables {
path "nomad/jobs/writes-vars" {
capabilities = ["write", "read"]
}
}
}
EOF