Skip to content

Instantly share code, notes, and snippets.

provider "aws" {
region = "ca-central-1"
}
provider "nomad" {
address = data.http.nomad.url
}
variable "ssh_key_name" {
type = string
diff --git a/baggage/HTTP_HEADER_FORMAT.md b/baggage/HTTP_HEADER_FORMAT.md
index 2b4b7ea..7f8e8e5 100644
--- a/baggage/HTTP_HEADER_FORMAT.md
+++ b/baggage/HTTP_HEADER_FORMAT.md
@@ -1,103 +1,164 @@
# Baggage HTTP Header Format
The `baggage` header is used to propagate user-supplied key-value pairs through a distributed request.
-A received header MAY be altered to change or add information and it MUST be passed on to all downstream requests.
+A received header MAY be altered to change or add information and it SHOULD be passed on to all downstream requests.
nomad job allocs -t '{{range .}}{{println .ID}}{{end}}' example | xargs -n1 nomad alloc restart
nomad job allocs -json example | jq '.[].ID' | xargs -n1 nomad alloc restart
@lgfa29
lgfa29 / main.tf
Last active July 11, 2022 20:43 — forked from sergsoares/main.tf
Snippet for use variables as a map
# variables.tf
variable "myapp_conf" {
type = map
}
# terraform.tfvars
myapp_conf = {
REPLICAS = 0
LIMIT_CPU = "50m"
LIMIT_MEMORY = "96Mi"
variable "version" {}
locals {
versions = {
v2 = {
"app.mydomain.com" = "abcd.region.elb.amazonaws.com"
}
v1 = {
"app.mydomain.com" = "xpto.region.elb.amazonaws.com"
}
diff --git a/nomad/structs/network.go b/nomad/structs/network.go
index 30e769323..3f7f1c8be 100644
--- a/nomad/structs/network.go
+++ b/nomad/structs/network.go
@@ -4,6 +4,8 @@ import (
"fmt"
"math/rand"
"net"
+ "os"
+ "strings"
provider "local" {}
variable "servers" {
type = map(object({
ip = string
}))
}
resource "local_file" "vms" {
for_each = var.servers
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import nomad_client
from pprint import pprint
from nomad_client.api import allocations_api
configuration = nomad_client.Configuration(
host = "http://127.0.0.1:4646/v1"
)
with nomad_client.ApiClient(configuration) as api_client:
allocs_api = allocations_api.AllocationsApi(api_client)
git bisect start
# good: [585139bd00acbc273d83b3a72496890f28996202] Release v0.13.7
git bisect good 585139bd00acbc273d83b3a72496890f28996202
# bad: [02f0ec232ae8c076e047b62b758ea2b4b6d28099] Release v0.14.0
git bisect bad 02f0ec232ae8c076e047b62b758ea2b4b6d28099
# good: [42835119d4ba0dc2832a131711d7975cfbe8fc70] Cleanup after v0.13.2 release
git bisect good 42835119d4ba0dc2832a131711d7975cfbe8fc70
# bad: [55c96da27eafede07abf26227da50a060c918540] Move nested block printing to own method for readability
git bisect bad 55c96da27eafede07abf26227da50a060c918540
# bad: [921f36a361ef0f7ce980525beffd8c8c58906f73] Merge pull request #26317 from hashicorp/jbardin/remove-refresh-walk