1. Packages
  2. Nomad Provider
  3. API Docs
  4. Job
Viewing docs for Nomad v0.4.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
nomad logo
Viewing docs for Nomad v0.4.1 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Create Job Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Job(name: string, args: JobArgs, opts?: CustomResourceOptions);
    @overload
    def Job(resource_name: str,
            args: JobArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Job(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            jobspec: Optional[str] = None,
            consul_token: Optional[str] = None,
            deregister_on_destroy: Optional[bool] = None,
            deregister_on_id_change: Optional[bool] = None,
            detach: Optional[bool] = None,
            hcl2: Optional[JobHcl2Args] = None,
            json: Optional[bool] = None,
            policy_override: Optional[bool] = None,
            purge_on_destroy: Optional[bool] = None,
            vault_token: Optional[str] = None)
    func NewJob(ctx *Context, name string, args JobArgs, opts ...ResourceOption) (*Job, error)
    public Job(string name, JobArgs args, CustomResourceOptions? opts = null)
    public Job(String name, JobArgs args)
    public Job(String name, JobArgs args, CustomResourceOptions options)
    
    type: nomad:Job
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args JobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args JobArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args JobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args JobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args JobArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var jobResource = new Nomad.Job("jobResource", new()
    {
        Jobspec = "string",
        ConsulToken = "string",
        DeregisterOnDestroy = false,
        DeregisterOnIdChange = false,
        Detach = false,
        Hcl2 = new Nomad.Inputs.JobHcl2Args
        {
            AllowFs = false,
            Enabled = false,
            Vars = 
            {
                { "string", "any" },
            },
        },
        Json = false,
        PolicyOverride = false,
        PurgeOnDestroy = false,
        VaultToken = "string",
    });
    
    example, err := nomad.NewJob(ctx, "jobResource", &nomad.JobArgs{
    	Jobspec:              pulumi.String("string"),
    	ConsulToken:          pulumi.String("string"),
    	DeregisterOnDestroy:  pulumi.Bool(false),
    	DeregisterOnIdChange: pulumi.Bool(false),
    	Detach:               pulumi.Bool(false),
    	Hcl2: &nomad.JobHcl2Args{
    		AllowFs: pulumi.Bool(false),
    		Enabled: pulumi.Bool(false),
    		Vars: pulumi.Map{
    			"string": pulumi.Any("any"),
    		},
    	},
    	Json:           pulumi.Bool(false),
    	PolicyOverride: pulumi.Bool(false),
    	PurgeOnDestroy: pulumi.Bool(false),
    	VaultToken:     pulumi.String("string"),
    })
    
    var jobResource = new Job("jobResource", JobArgs.builder()
        .jobspec("string")
        .consulToken("string")
        .deregisterOnDestroy(false)
        .deregisterOnIdChange(false)
        .detach(false)
        .hcl2(JobHcl2Args.builder()
            .allowFs(false)
            .enabled(false)
            .vars(Map.of("string", "any"))
            .build())
        .json(false)
        .policyOverride(false)
        .purgeOnDestroy(false)
        .vaultToken("string")
        .build());
    
    job_resource = nomad.Job("jobResource",
        jobspec="string",
        consul_token="string",
        deregister_on_destroy=False,
        deregister_on_id_change=False,
        detach=False,
        hcl2={
            "allow_fs": False,
            "enabled": False,
            "vars": {
                "string": "any",
            },
        },
        json=False,
        policy_override=False,
        purge_on_destroy=False,
        vault_token="string")
    
    const jobResource = new nomad.Job("jobResource", {
        jobspec: "string",
        consulToken: "string",
        deregisterOnDestroy: false,
        deregisterOnIdChange: false,
        detach: false,
        hcl2: {
            allowFs: false,
            enabled: false,
            vars: {
                string: "any",
            },
        },
        json: false,
        policyOverride: false,
        purgeOnDestroy: false,
        vaultToken: "string",
    });
    
    type: nomad:Job
    properties:
        consulToken: string
        deregisterOnDestroy: false
        deregisterOnIdChange: false
        detach: false
        hcl2:
            allowFs: false
            enabled: false
            vars:
                string: any
        jobspec: string
        json: false
        policyOverride: false
        purgeOnDestroy: false
        vaultToken: string
    

    Job Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Job resource accepts the following input properties:

    Jobspec string
    (string: <required>) - The contents of the jobspec to register.
    ConsulToken string
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    DeregisterOnDestroy bool
    If true, the job will be deregistered on destroy.
    DeregisterOnIdChange bool
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    Detach bool
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    Hcl2 JobHcl2
    (block: optional) - Options for the HCL2 jobspec parser.
    Json bool
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    PolicyOverride bool
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    PurgeOnDestroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    VaultToken string
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    Jobspec string
    (string: <required>) - The contents of the jobspec to register.
    ConsulToken string
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    DeregisterOnDestroy bool
    If true, the job will be deregistered on destroy.
    DeregisterOnIdChange bool
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    Detach bool
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    Hcl2 JobHcl2Args
    (block: optional) - Options for the HCL2 jobspec parser.
    Json bool
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    PolicyOverride bool
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    PurgeOnDestroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    VaultToken string
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    jobspec String
    (string: <required>) - The contents of the jobspec to register.
    consulToken String
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    deregisterOnDestroy Boolean
    If true, the job will be deregistered on destroy.
    deregisterOnIdChange Boolean
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    detach Boolean
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    hcl2 JobHcl2
    (block: optional) - Options for the HCL2 jobspec parser.
    json Boolean
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    policyOverride Boolean
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    purgeOnDestroy Boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    vaultToken String
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    jobspec string
    (string: <required>) - The contents of the jobspec to register.
    consulToken string
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    deregisterOnDestroy boolean
    If true, the job will be deregistered on destroy.
    deregisterOnIdChange boolean
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    detach boolean
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    hcl2 JobHcl2
    (block: optional) - Options for the HCL2 jobspec parser.
    json boolean
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    policyOverride boolean
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    purgeOnDestroy boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    vaultToken string
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    jobspec str
    (string: <required>) - The contents of the jobspec to register.
    consul_token str
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    deregister_on_destroy bool
    If true, the job will be deregistered on destroy.
    deregister_on_id_change bool
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    detach bool
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    hcl2 JobHcl2Args
    (block: optional) - Options for the HCL2 jobspec parser.
    json bool
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    policy_override bool
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    purge_on_destroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    vault_token str
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    jobspec String
    (string: <required>) - The contents of the jobspec to register.
    consulToken String
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    deregisterOnDestroy Boolean
    If true, the job will be deregistered on destroy.
    deregisterOnIdChange Boolean
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    detach Boolean
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    hcl2 Property Map
    (block: optional) - Options for the HCL2 jobspec parser.
    json Boolean
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    policyOverride Boolean
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    purgeOnDestroy Boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    vaultToken String
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Job resource produces the following output properties:

    AllocationIds List<string>
    The IDs for allocations associated with this job.
    Datacenters List<string>
    The target datacenters for the job, as derived from the jobspec.
    DeploymentId string
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    DeploymentStatus string
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifyIndex string
    Integer that increments for each change. Used to detect any changes between plan and apply.
    Name string
    The name of the job, as derived from the jobspec.
    Namespace string
    The namespace of the job, as derived from the jobspec.
    Region string
    The target region for the job, as derived from the jobspec.
    TaskGroups List<JobTaskGroup>
    Type string
    The type of the job, as derived from the jobspec.
    AllocationIds []string
    The IDs for allocations associated with this job.
    Datacenters []string
    The target datacenters for the job, as derived from the jobspec.
    DeploymentId string
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    DeploymentStatus string
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifyIndex string
    Integer that increments for each change. Used to detect any changes between plan and apply.
    Name string
    The name of the job, as derived from the jobspec.
    Namespace string
    The namespace of the job, as derived from the jobspec.
    Region string
    The target region for the job, as derived from the jobspec.
    TaskGroups []JobTaskGroup
    Type string
    The type of the job, as derived from the jobspec.
    allocationIds List<String>
    The IDs for allocations associated with this job.
    datacenters List<String>
    The target datacenters for the job, as derived from the jobspec.
    deploymentId String
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    deploymentStatus String
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    id String
    The provider-assigned unique ID for this managed resource.
    modifyIndex String
    Integer that increments for each change. Used to detect any changes between plan and apply.
    name String
    The name of the job, as derived from the jobspec.
    namespace String
    The namespace of the job, as derived from the jobspec.
    region String
    The target region for the job, as derived from the jobspec.
    taskGroups List<JobTaskGroup>
    type String
    The type of the job, as derived from the jobspec.
    allocationIds string[]
    The IDs for allocations associated with this job.
    datacenters string[]
    The target datacenters for the job, as derived from the jobspec.
    deploymentId string
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    deploymentStatus string
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    id string
    The provider-assigned unique ID for this managed resource.
    modifyIndex string
    Integer that increments for each change. Used to detect any changes between plan and apply.
    name string
    The name of the job, as derived from the jobspec.
    namespace string
    The namespace of the job, as derived from the jobspec.
    region string
    The target region for the job, as derived from the jobspec.
    taskGroups JobTaskGroup[]
    type string
    The type of the job, as derived from the jobspec.
    allocation_ids Sequence[str]
    The IDs for allocations associated with this job.
    datacenters Sequence[str]
    The target datacenters for the job, as derived from the jobspec.
    deployment_id str
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    deployment_status str
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    id str
    The provider-assigned unique ID for this managed resource.
    modify_index str
    Integer that increments for each change. Used to detect any changes between plan and apply.
    name str
    The name of the job, as derived from the jobspec.
    namespace str
    The namespace of the job, as derived from the jobspec.
    region str
    The target region for the job, as derived from the jobspec.
    task_groups Sequence[JobTaskGroup]
    type str
    The type of the job, as derived from the jobspec.
    allocationIds List<String>
    The IDs for allocations associated with this job.
    datacenters List<String>
    The target datacenters for the job, as derived from the jobspec.
    deploymentId String
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    deploymentStatus String
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    id String
    The provider-assigned unique ID for this managed resource.
    modifyIndex String
    Integer that increments for each change. Used to detect any changes between plan and apply.
    name String
    The name of the job, as derived from the jobspec.
    namespace String
    The namespace of the job, as derived from the jobspec.
    region String
    The target region for the job, as derived from the jobspec.
    taskGroups List<Property Map>
    type String
    The type of the job, as derived from the jobspec.

    Look up Existing Job Resource

    Get an existing Job resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: JobState, opts?: CustomResourceOptions): Job
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allocation_ids: Optional[Sequence[str]] = None,
            consul_token: Optional[str] = None,
            datacenters: Optional[Sequence[str]] = None,
            deployment_id: Optional[str] = None,
            deployment_status: Optional[str] = None,
            deregister_on_destroy: Optional[bool] = None,
            deregister_on_id_change: Optional[bool] = None,
            detach: Optional[bool] = None,
            hcl2: Optional[JobHcl2Args] = None,
            jobspec: Optional[str] = None,
            json: Optional[bool] = None,
            modify_index: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            policy_override: Optional[bool] = None,
            purge_on_destroy: Optional[bool] = None,
            region: Optional[str] = None,
            task_groups: Optional[Sequence[JobTaskGroupArgs]] = None,
            type: Optional[str] = None,
            vault_token: Optional[str] = None) -> Job
    func GetJob(ctx *Context, name string, id IDInput, state *JobState, opts ...ResourceOption) (*Job, error)
    public static Job Get(string name, Input<string> id, JobState? state, CustomResourceOptions? opts = null)
    public static Job get(String name, Output<String> id, JobState state, CustomResourceOptions options)
    resources:  _:    type: nomad:Job    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AllocationIds List<string>
    The IDs for allocations associated with this job.
    ConsulToken string
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    Datacenters List<string>
    The target datacenters for the job, as derived from the jobspec.
    DeploymentId string
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    DeploymentStatus string
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    DeregisterOnDestroy bool
    If true, the job will be deregistered on destroy.
    DeregisterOnIdChange bool
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    Detach bool
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    Hcl2 JobHcl2
    (block: optional) - Options for the HCL2 jobspec parser.
    Jobspec string
    (string: <required>) - The contents of the jobspec to register.
    Json bool
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    ModifyIndex string
    Integer that increments for each change. Used to detect any changes between plan and apply.
    Name string
    The name of the job, as derived from the jobspec.
    Namespace string
    The namespace of the job, as derived from the jobspec.
    PolicyOverride bool
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    PurgeOnDestroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    Region string
    The target region for the job, as derived from the jobspec.
    TaskGroups List<JobTaskGroup>
    Type string
    The type of the job, as derived from the jobspec.
    VaultToken string
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    AllocationIds []string
    The IDs for allocations associated with this job.
    ConsulToken string
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    Datacenters []string
    The target datacenters for the job, as derived from the jobspec.
    DeploymentId string
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    DeploymentStatus string
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    DeregisterOnDestroy bool
    If true, the job will be deregistered on destroy.
    DeregisterOnIdChange bool
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    Detach bool
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    Hcl2 JobHcl2Args
    (block: optional) - Options for the HCL2 jobspec parser.
    Jobspec string
    (string: <required>) - The contents of the jobspec to register.
    Json bool
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    ModifyIndex string
    Integer that increments for each change. Used to detect any changes between plan and apply.
    Name string
    The name of the job, as derived from the jobspec.
    Namespace string
    The namespace of the job, as derived from the jobspec.
    PolicyOverride bool
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    PurgeOnDestroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    Region string
    The target region for the job, as derived from the jobspec.
    TaskGroups []JobTaskGroupArgs
    Type string
    The type of the job, as derived from the jobspec.
    VaultToken string
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    allocationIds List<String>
    The IDs for allocations associated with this job.
    consulToken String
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    datacenters List<String>
    The target datacenters for the job, as derived from the jobspec.
    deploymentId String
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    deploymentStatus String
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    deregisterOnDestroy Boolean
    If true, the job will be deregistered on destroy.
    deregisterOnIdChange Boolean
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    detach Boolean
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    hcl2 JobHcl2
    (block: optional) - Options for the HCL2 jobspec parser.
    jobspec String
    (string: <required>) - The contents of the jobspec to register.
    json Boolean
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    modifyIndex String
    Integer that increments for each change. Used to detect any changes between plan and apply.
    name String
    The name of the job, as derived from the jobspec.
    namespace String
    The namespace of the job, as derived from the jobspec.
    policyOverride Boolean
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    purgeOnDestroy Boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    region String
    The target region for the job, as derived from the jobspec.
    taskGroups List<JobTaskGroup>
    type String
    The type of the job, as derived from the jobspec.
    vaultToken String
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    allocationIds string[]
    The IDs for allocations associated with this job.
    consulToken string
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    datacenters string[]
    The target datacenters for the job, as derived from the jobspec.
    deploymentId string
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    deploymentStatus string
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    deregisterOnDestroy boolean
    If true, the job will be deregistered on destroy.
    deregisterOnIdChange boolean
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    detach boolean
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    hcl2 JobHcl2
    (block: optional) - Options for the HCL2 jobspec parser.
    jobspec string
    (string: <required>) - The contents of the jobspec to register.
    json boolean
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    modifyIndex string
    Integer that increments for each change. Used to detect any changes between plan and apply.
    name string
    The name of the job, as derived from the jobspec.
    namespace string
    The namespace of the job, as derived from the jobspec.
    policyOverride boolean
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    purgeOnDestroy boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    region string
    The target region for the job, as derived from the jobspec.
    taskGroups JobTaskGroup[]
    type string
    The type of the job, as derived from the jobspec.
    vaultToken string
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    allocation_ids Sequence[str]
    The IDs for allocations associated with this job.
    consul_token str
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    datacenters Sequence[str]
    The target datacenters for the job, as derived from the jobspec.
    deployment_id str
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    deployment_status str
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    deregister_on_destroy bool
    If true, the job will be deregistered on destroy.
    deregister_on_id_change bool
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    detach bool
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    hcl2 JobHcl2Args
    (block: optional) - Options for the HCL2 jobspec parser.
    jobspec str
    (string: <required>) - The contents of the jobspec to register.
    json bool
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    modify_index str
    Integer that increments for each change. Used to detect any changes between plan and apply.
    name str
    The name of the job, as derived from the jobspec.
    namespace str
    The namespace of the job, as derived from the jobspec.
    policy_override bool
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    purge_on_destroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    region str
    The target region for the job, as derived from the jobspec.
    task_groups Sequence[JobTaskGroupArgs]
    type str
    The type of the job, as derived from the jobspec.
    vault_token str
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    allocationIds List<String>
    The IDs for allocations associated with this job.
    consulToken String
    (string: <optional>) - Consul token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.
    datacenters List<String>
    The target datacenters for the job, as derived from the jobspec.
    deploymentId String
    If detach = false, the ID for the deployment associated with the last job create/update, if one exists.
    deploymentStatus String
    If detach = false, the status for the deployment associated with the last job create/update, if one exists.
    deregisterOnDestroy Boolean
    If true, the job will be deregistered on destroy.
    deregisterOnIdChange Boolean
    (boolean: true) - Determines if the job will be deregistered if the ID of the job in the jobspec changes.
    detach Boolean
    (boolean: true) - If true, the provider will return immediately after creating or updating, instead of monitoring.
    hcl2 Property Map
    (block: optional) - Options for the HCL2 jobspec parser.
    jobspec String
    (string: <required>) - The contents of the jobspec to register.
    json Boolean
    (boolean: false) - Set this to true if your jobspec is structured with JSON instead of the default HCL.
    modifyIndex String
    Integer that increments for each change. Used to detect any changes between plan and apply.
    name String
    The name of the job, as derived from the jobspec.
    namespace String
    The namespace of the job, as derived from the jobspec.
    policyOverride Boolean
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    purgeOnDestroy Boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    region String
    The target region for the job, as derived from the jobspec.
    taskGroups List<Property Map>
    type String
    The type of the job, as derived from the jobspec.
    vaultToken String
    (string: <optional>) - Vault token used when registering this job. Will fallback to the value declared in Nomad provider configuration, if any.

    Supporting Types

    JobHcl2, JobHcl2Args

    AllowFs bool
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    Enabled bool
    (boolean: false) - Set this to true if your jobspec uses the HCL2 format instead of the default HCL.
    Vars Dictionary<string, object>
    AllowFs bool
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    Enabled bool
    (boolean: false) - Set this to true if your jobspec uses the HCL2 format instead of the default HCL.
    Vars map[string]interface{}
    allowFs Boolean
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    enabled Boolean
    (boolean: false) - Set this to true if your jobspec uses the HCL2 format instead of the default HCL.
    vars Map<String,Object>
    allowFs boolean
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    enabled boolean
    (boolean: false) - Set this to true if your jobspec uses the HCL2 format instead of the default HCL.
    vars {[key: string]: any}
    allow_fs bool
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    enabled bool
    (boolean: false) - Set this to true if your jobspec uses the HCL2 format instead of the default HCL.
    vars Mapping[str, Any]
    allowFs Boolean
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    enabled Boolean
    (boolean: false) - Set this to true if your jobspec uses the HCL2 format instead of the default HCL.
    vars Map<Any>

    JobTaskGroup, JobTaskGroupArgs

    JobTaskGroupTask, JobTaskGroupTaskArgs

    Driver string
    Meta Dictionary<string, object>
    Name string
    VolumeMounts List<JobTaskGroupTaskVolumeMount>
    Driver string
    Meta map[string]interface{}
    Name string
    VolumeMounts []JobTaskGroupTaskVolumeMount

    JobTaskGroupTaskVolumeMount, JobTaskGroupTaskVolumeMountArgs

    Destination string
    ReadOnly bool
    Volume string
    Destination string
    ReadOnly bool
    Volume string
    destination String
    readOnly Boolean
    volume String
    destination string
    readOnly boolean
    volume string
    destination String
    readOnly Boolean
    volume String

    JobTaskGroupVolume, JobTaskGroupVolumeArgs

    Name string
    ReadOnly bool
    Source string
    Type string
    Name string
    ReadOnly bool
    Source string
    Type string
    name String
    readOnly Boolean
    source String
    type String
    name string
    readOnly boolean
    source string
    type string
    name str
    read_only bool
    source str
    type str
    name String
    readOnly Boolean
    source String
    type String

    Package Details

    Repository
    HashiCorp Nomad pulumi/pulumi-nomad
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nomad Terraform Provider.
    nomad logo
    Viewing docs for Nomad v0.4.1 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.