Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
5e252771
Unverified
Commit
5e252771
authored
3 years ago
by
James Rasell
Browse files
Options
Download
Email Patches
Plain Diff
e2e: fix provisioning when ACLs and TLS enabled; no nightly TLS.
parent
b7d2da3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
e2e/terraform/nomad-acls.tf
+5
-1
e2e/terraform/nomad-acls.tf
e2e/terraform/terraform.full.tfvars
+1
-0
e2e/terraform/terraform.full.tfvars
with
6 additions
and
1 deletion
+6
-1
e2e/terraform/nomad-acls.tf
+
5
-
1
View file @
5e252771
...
...
@@ -5,6 +5,10 @@
# So we run a bootstrapping script and write our management token into a file
# that we read in for the output of $(terraform output environment) later.
locals
{
nomad_env
=
var
.
tls
?
"NOMAD_ADDR=https://
${
aws_instance
.
server
.
0
.
public_ip
}
:4646 NOMAD_CACERT=keys/tls_ca.crt NOMAD_CLIENT_CERT=keys/tls_api_client.crt NOMAD_CLIENT_KEY=keys/tls_api_client.key"
:
"NOMAD_ADDR=http://
${
aws_instance
.
server
.
0
.
public_ip
}
:4646"
}
resource
"null_resource"
"bootstrap_nomad_acls"
{
depends_on
=
[
module
.
nomad_server
]
triggers
=
{
...
...
@@ -20,7 +24,7 @@ resource "null_resource" "bootstrap_nomad_acls" {
# so that we can read it into the data.local_file later. If not set,
# ensure that it's empty.
data
"template_file"
"bootstrap_nomad_script"
{
template
=
var
.
nomad_acls
?
"
NOMAD_ADDR=http://
${
aws_instance
.
server
.
0
.
public_ip
}
:4646
./scripts/bootstrap-nomad.sh"
:
"mkdir -p
${
path
.
root
}
/keys; echo >
${
path
.
root
}
/keys/nomad_root_token"
template
=
var
.
nomad_acls
?
"
${
local
.
nomad_env
}
./scripts/bootstrap-nomad.sh"
:
"mkdir -p
${
path
.
root
}
/keys; echo >
${
path
.
root
}
/keys/nomad_root_token"
}
data
"local_file"
"nomad_token"
{
...
...
This diff is collapsed.
Click to expand it.
e2e/terraform/terraform.full.tfvars
+
1
-
0
View file @
5e252771
...
...
@@ -8,6 +8,7 @@ nomad_enterprise = true
nomad_acls = true
vault = true
volumes = true
tls = false
# required to avoid picking up defaults from terraform.tfvars file
nomad_version = "" # default version for deployment
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment