2 # The "region" parameter specifies the region in which to execute the job.
3 # If omitted, this inherits the default region name of "global".
6 # The "datacenters" parameter specifies the list of datacenters which should
7 # be considered when placing this task. This must be provided.
8 datacenters = "${datacenters}"
10 # The "type" parameter controls the type of job, which impacts the scheduler's
11 # decision on placement. This configuration is optional and defaults to
12 # "service". For a full list of job types and their differences, please see
13 # the online documentation.
15 # For more information, please see the online documentation at:
17 # https://www.nomadproject.io/docs/jobspec/schedulers.html
21 # The "group" stanza defines a series of tasks that should be co-located on
22 # the same Nomad client. Any task within a group will be placed on the same
25 # For more information and examples on the "group" stanza, please see
26 # the online documentation at:
28 # https://www.nomadproject.io/docs/job-specification/group.html
30 group "prod-group1-mc" {
31 task "prod-task1-create-buckets" {
32 # The "driver" parameter specifies the task driver that should be used to
36 %{ if use_vault_provider }
38 policies = "${vault_kv_policy_name}"
42 # The "config" stanza specifies the driver configuration, which is passed
43 # directly to the driver to start the task. The details of configurations
44 # are specific to each driver, so please see specific driver
45 # documentation for more information.
53 dns_servers = [ "$${attr.unique.network.ip-address}" ]
57 # The env stanza configures a list of environment variables to populate
58 # the task's environment before starting.
60 %{ if use_vault_provider }
61 {{ with secret "${vault_kv_path}" }}
62 MINIO_ACCESS_KEY = "{{ .Data.data.${vault_kv_field_access_key} }}"
63 MINIO_SECRET_KEY = "{{ .Data.data.${vault_kv_field_secret_key} }}"
66 MINIO_ACCESS_KEY = "${access_key}"
67 MINIO_SECRET_KEY = "${secret_key}"