1. Packages
  2. Packages
  3. Nomad Provider
  4. API Docs
  5. Job
Viewing docs for Nomad v2.6.1
published on Tuesday, Apr 21, 2026 by Pulumi
nomad logo
Viewing docs for Nomad v2.6.1
published on Tuesday, Apr 21, 2026 by Pulumi

    Manages a job registered in Nomad.

    This can be used to initialize your cluster with system jobs, common services, and more. In day to day Nomad use it is common for developers to submit jobs to Nomad directly, such as for general app deployment. In addition to these apps, a Nomad cluster often runs core system services that are ideally setup during infrastructure creation. This resource is ideal for the latter type of job, but can be used to manage any job within Nomad.

    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,
            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,
            preserve_counts: Optional[bool] = None,
            purge_on_destroy: Optional[bool] = None,
            read_allocation_ids: Optional[bool] = None,
            rerun_if_dead: Optional[bool] = 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",
        DeregisterOnDestroy = false,
        DeregisterOnIdChange = false,
        Detach = false,
        Hcl2 = new Nomad.Inputs.JobHcl2Args
        {
            AllowFs = false,
            Vars = 
            {
                { "string", "string" },
            },
        },
        Json = false,
        PolicyOverride = false,
        PreserveCounts = false,
        PurgeOnDestroy = false,
        RerunIfDead = false,
    });
    
    example, err := nomad.NewJob(ctx, "jobResource", &nomad.JobArgs{
    	Jobspec:              pulumi.String("string"),
    	DeregisterOnDestroy:  pulumi.Bool(false),
    	DeregisterOnIdChange: pulumi.Bool(false),
    	Detach:               pulumi.Bool(false),
    	Hcl2: &nomad.JobHcl2Args{
    		AllowFs: pulumi.Bool(false),
    		Vars: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	Json:           pulumi.Bool(false),
    	PolicyOverride: pulumi.Bool(false),
    	PreserveCounts: pulumi.Bool(false),
    	PurgeOnDestroy: pulumi.Bool(false),
    	RerunIfDead:    pulumi.Bool(false),
    })
    
    var jobResource = new Job("jobResource", JobArgs.builder()
        .jobspec("string")
        .deregisterOnDestroy(false)
        .deregisterOnIdChange(false)
        .detach(false)
        .hcl2(JobHcl2Args.builder()
            .allowFs(false)
            .vars(Map.of("string", "string"))
            .build())
        .json(false)
        .policyOverride(false)
        .preserveCounts(false)
        .purgeOnDestroy(false)
        .rerunIfDead(false)
        .build());
    
    job_resource = nomad.Job("jobResource",
        jobspec="string",
        deregister_on_destroy=False,
        deregister_on_id_change=False,
        detach=False,
        hcl2={
            "allow_fs": False,
            "vars": {
                "string": "string",
            },
        },
        json=False,
        policy_override=False,
        preserve_counts=False,
        purge_on_destroy=False,
        rerun_if_dead=False)
    
    const jobResource = new nomad.Job("jobResource", {
        jobspec: "string",
        deregisterOnDestroy: false,
        deregisterOnIdChange: false,
        detach: false,
        hcl2: {
            allowFs: false,
            vars: {
                string: "string",
            },
        },
        json: false,
        policyOverride: false,
        preserveCounts: false,
        purgeOnDestroy: false,
        rerunIfDead: false,
    });
    
    type: nomad:Job
    properties:
        deregisterOnDestroy: false
        deregisterOnIdChange: false
        detach: false
        hcl2:
            allowFs: false
            vars:
                string: string
        jobspec: string
        json: false
        policyOverride: false
        preserveCounts: false
        purgeOnDestroy: false
        rerunIfDead: false
    

    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.
    DeregisterOnDestroy bool
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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.
    PreserveCounts bool
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    PurgeOnDestroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    ReadAllocationIds bool

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    RerunIfDead bool
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    Jobspec string
    (string: <required>) - The contents of the jobspec to register.
    DeregisterOnDestroy bool
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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.
    PreserveCounts bool
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    PurgeOnDestroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    ReadAllocationIds bool

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    RerunIfDead bool
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    jobspec String
    (string: <required>) - The contents of the jobspec to register.
    deregisterOnDestroy Boolean
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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.
    preserveCounts Boolean
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    purgeOnDestroy Boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    readAllocationIds Boolean

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    rerunIfDead Boolean
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    jobspec string
    (string: <required>) - The contents of the jobspec to register.
    deregisterOnDestroy boolean
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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.
    preserveCounts boolean
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    purgeOnDestroy boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    readAllocationIds boolean

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    rerunIfDead boolean
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    jobspec str
    (string: <required>) - The contents of the jobspec to register.
    deregister_on_destroy bool
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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.
    preserve_counts bool
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    purge_on_destroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    read_allocation_ids bool

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    rerun_if_dead bool
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    jobspec String
    (string: <required>) - The contents of the jobspec to register.
    deregisterOnDestroy Boolean
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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.
    preserveCounts Boolean
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    purgeOnDestroy Boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    readAllocationIds Boolean

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    rerunIfDead Boolean
    (boolean: false) - Set this to true to force the job to run again if its status is dead.

    Outputs

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

    AllAtOnce bool
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    AllocationIds List<string>
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    Constraints List<JobConstraint>
    (list of maps) - Job constraints.
    CreateIndex int
    (integer) - The job creation index.
    Datacenters List<string>
    (set of strings) - The target datacenters for the job.
    DeploymentId string
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    DeploymentStatus string
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifyIndex string
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    Name string
    (string) - Volume name.
    Namespace string
    (string) - The namespace of the job, as derived from the jobspec.
    ParentId string
    (string) - The parent job ID, if applicable.
    PeriodicConfigs List<JobPeriodicConfig>
    (list of maps) - The job's periodic configuration.
    Priority int
    (integer) - The job priority for scheduling and resource access.
    Region string
    (string) - The target region for the job.
    Stable bool
    (boolean) - Whether the job is stable.
    Status string
    (string) - The current status of the job.
    StatusDescription string
    (string) - Additional status information returned by Nomad.
    Stop bool
    (boolean) - Whether the job is stopped.
    SubmitTime string
    (integer) - The Unix timestamp when the job was submitted.
    TaskGroups List<JobTaskGroup>
    (list of maps) - A list of the job's task groups.
    Type string
    (string) - Volume type.
    UpdateStrategies List<JobUpdateStrategy>
    (list of maps) - Effective update strategy for the task group.
    Version int
    (integer) - The current job version.
    AllAtOnce bool
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    AllocationIds []string
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    Constraints []JobConstraint
    (list of maps) - Job constraints.
    CreateIndex int
    (integer) - The job creation index.
    Datacenters []string
    (set of strings) - The target datacenters for the job.
    DeploymentId string
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    DeploymentStatus string
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifyIndex string
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    Name string
    (string) - Volume name.
    Namespace string
    (string) - The namespace of the job, as derived from the jobspec.
    ParentId string
    (string) - The parent job ID, if applicable.
    PeriodicConfigs []JobPeriodicConfig
    (list of maps) - The job's periodic configuration.
    Priority int
    (integer) - The job priority for scheduling and resource access.
    Region string
    (string) - The target region for the job.
    Stable bool
    (boolean) - Whether the job is stable.
    Status string
    (string) - The current status of the job.
    StatusDescription string
    (string) - Additional status information returned by Nomad.
    Stop bool
    (boolean) - Whether the job is stopped.
    SubmitTime string
    (integer) - The Unix timestamp when the job was submitted.
    TaskGroups []JobTaskGroup
    (list of maps) - A list of the job's task groups.
    Type string
    (string) - Volume type.
    UpdateStrategies []JobUpdateStrategy
    (list of maps) - Effective update strategy for the task group.
    Version int
    (integer) - The current job version.
    allAtOnce Boolean
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    allocationIds List<String>
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    constraints List<JobConstraint>
    (list of maps) - Job constraints.
    createIndex Integer
    (integer) - The job creation index.
    datacenters List<String>
    (set of strings) - The target datacenters for the job.
    deploymentId String
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    deploymentStatus String
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    id String
    The provider-assigned unique ID for this managed resource.
    modifyIndex String
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    name String
    (string) - Volume name.
    namespace String
    (string) - The namespace of the job, as derived from the jobspec.
    parentId String
    (string) - The parent job ID, if applicable.
    periodicConfigs List<JobPeriodicConfig>
    (list of maps) - The job's periodic configuration.
    priority Integer
    (integer) - The job priority for scheduling and resource access.
    region String
    (string) - The target region for the job.
    stable Boolean
    (boolean) - Whether the job is stable.
    status String
    (string) - The current status of the job.
    statusDescription String
    (string) - Additional status information returned by Nomad.
    stop Boolean
    (boolean) - Whether the job is stopped.
    submitTime String
    (integer) - The Unix timestamp when the job was submitted.
    taskGroups List<JobTaskGroup>
    (list of maps) - A list of the job's task groups.
    type String
    (string) - Volume type.
    updateStrategies List<JobUpdateStrategy>
    (list of maps) - Effective update strategy for the task group.
    version Integer
    (integer) - The current job version.
    allAtOnce boolean
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    allocationIds string[]
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    constraints JobConstraint[]
    (list of maps) - Job constraints.
    createIndex number
    (integer) - The job creation index.
    datacenters string[]
    (set of strings) - The target datacenters for the job.
    deploymentId string
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    deploymentStatus string
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    id string
    The provider-assigned unique ID for this managed resource.
    modifyIndex string
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    name string
    (string) - Volume name.
    namespace string
    (string) - The namespace of the job, as derived from the jobspec.
    parentId string
    (string) - The parent job ID, if applicable.
    periodicConfigs JobPeriodicConfig[]
    (list of maps) - The job's periodic configuration.
    priority number
    (integer) - The job priority for scheduling and resource access.
    region string
    (string) - The target region for the job.
    stable boolean
    (boolean) - Whether the job is stable.
    status string
    (string) - The current status of the job.
    statusDescription string
    (string) - Additional status information returned by Nomad.
    stop boolean
    (boolean) - Whether the job is stopped.
    submitTime string
    (integer) - The Unix timestamp when the job was submitted.
    taskGroups JobTaskGroup[]
    (list of maps) - A list of the job's task groups.
    type string
    (string) - Volume type.
    updateStrategies JobUpdateStrategy[]
    (list of maps) - Effective update strategy for the task group.
    version number
    (integer) - The current job version.
    all_at_once bool
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    allocation_ids Sequence[str]
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    constraints Sequence[JobConstraint]
    (list of maps) - Job constraints.
    create_index int
    (integer) - The job creation index.
    datacenters Sequence[str]
    (set of strings) - The target datacenters for the job.
    deployment_id str
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    deployment_status str
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    id str
    The provider-assigned unique ID for this managed resource.
    modify_index str
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    name str
    (string) - Volume name.
    namespace str
    (string) - The namespace of the job, as derived from the jobspec.
    parent_id str
    (string) - The parent job ID, if applicable.
    periodic_configs Sequence[JobPeriodicConfig]
    (list of maps) - The job's periodic configuration.
    priority int
    (integer) - The job priority for scheduling and resource access.
    region str
    (string) - The target region for the job.
    stable bool
    (boolean) - Whether the job is stable.
    status str
    (string) - The current status of the job.
    status_description str
    (string) - Additional status information returned by Nomad.
    stop bool
    (boolean) - Whether the job is stopped.
    submit_time str
    (integer) - The Unix timestamp when the job was submitted.
    task_groups Sequence[JobTaskGroup]
    (list of maps) - A list of the job's task groups.
    type str
    (string) - Volume type.
    update_strategies Sequence[JobUpdateStrategy]
    (list of maps) - Effective update strategy for the task group.
    version int
    (integer) - The current job version.
    allAtOnce Boolean
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    allocationIds List<String>
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    constraints List<Property Map>
    (list of maps) - Job constraints.
    createIndex Number
    (integer) - The job creation index.
    datacenters List<String>
    (set of strings) - The target datacenters for the job.
    deploymentId String
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    deploymentStatus String
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    id String
    The provider-assigned unique ID for this managed resource.
    modifyIndex String
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    name String
    (string) - Volume name.
    namespace String
    (string) - The namespace of the job, as derived from the jobspec.
    parentId String
    (string) - The parent job ID, if applicable.
    periodicConfigs List<Property Map>
    (list of maps) - The job's periodic configuration.
    priority Number
    (integer) - The job priority for scheduling and resource access.
    region String
    (string) - The target region for the job.
    stable Boolean
    (boolean) - Whether the job is stable.
    status String
    (string) - The current status of the job.
    statusDescription String
    (string) - Additional status information returned by Nomad.
    stop Boolean
    (boolean) - Whether the job is stopped.
    submitTime String
    (integer) - The Unix timestamp when the job was submitted.
    taskGroups List<Property Map>
    (list of maps) - A list of the job's task groups.
    type String
    (string) - Volume type.
    updateStrategies List<Property Map>
    (list of maps) - Effective update strategy for the task group.
    version Number
    (integer) - The current job version.

    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,
            all_at_once: Optional[bool] = None,
            allocation_ids: Optional[Sequence[str]] = None,
            constraints: Optional[Sequence[JobConstraintArgs]] = None,
            create_index: Optional[int] = 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,
            parent_id: Optional[str] = None,
            periodic_configs: Optional[Sequence[JobPeriodicConfigArgs]] = None,
            policy_override: Optional[bool] = None,
            preserve_counts: Optional[bool] = None,
            priority: Optional[int] = None,
            purge_on_destroy: Optional[bool] = None,
            read_allocation_ids: Optional[bool] = None,
            region: Optional[str] = None,
            rerun_if_dead: Optional[bool] = None,
            stable: Optional[bool] = None,
            status: Optional[str] = None,
            status_description: Optional[str] = None,
            stop: Optional[bool] = None,
            submit_time: Optional[str] = None,
            task_groups: Optional[Sequence[JobTaskGroupArgs]] = None,
            type: Optional[str] = None,
            update_strategies: Optional[Sequence[JobUpdateStrategyArgs]] = None,
            version: Optional[int] = 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:
    AllAtOnce bool
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    AllocationIds List<string>
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    Constraints List<JobConstraint>
    (list of maps) - Job constraints.
    CreateIndex int
    (integer) - The job creation index.
    Datacenters List<string>
    (set of strings) - The target datacenters for the job.
    DeploymentId string
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    DeploymentStatus string
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    DeregisterOnDestroy bool
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    Name string
    (string) - Volume name.
    Namespace string
    (string) - The namespace of the job, as derived from the jobspec.
    ParentId string
    (string) - The parent job ID, if applicable.
    PeriodicConfigs List<JobPeriodicConfig>
    (list of maps) - The job's periodic configuration.
    PolicyOverride bool
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    PreserveCounts bool
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    Priority int
    (integer) - The job priority for scheduling and resource access.
    PurgeOnDestroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    ReadAllocationIds bool

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    Region string
    (string) - The target region for the job.
    RerunIfDead bool
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    Stable bool
    (boolean) - Whether the job is stable.
    Status string
    (string) - The current status of the job.
    StatusDescription string
    (string) - Additional status information returned by Nomad.
    Stop bool
    (boolean) - Whether the job is stopped.
    SubmitTime string
    (integer) - The Unix timestamp when the job was submitted.
    TaskGroups List<JobTaskGroup>
    (list of maps) - A list of the job's task groups.
    Type string
    (string) - Volume type.
    UpdateStrategies List<JobUpdateStrategy>
    (list of maps) - Effective update strategy for the task group.
    Version int
    (integer) - The current job version.
    AllAtOnce bool
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    AllocationIds []string
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    Constraints []JobConstraintArgs
    (list of maps) - Job constraints.
    CreateIndex int
    (integer) - The job creation index.
    Datacenters []string
    (set of strings) - The target datacenters for the job.
    DeploymentId string
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    DeploymentStatus string
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    DeregisterOnDestroy bool
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    Name string
    (string) - Volume name.
    Namespace string
    (string) - The namespace of the job, as derived from the jobspec.
    ParentId string
    (string) - The parent job ID, if applicable.
    PeriodicConfigs []JobPeriodicConfigArgs
    (list of maps) - The job's periodic configuration.
    PolicyOverride bool
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    PreserveCounts bool
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    Priority int
    (integer) - The job priority for scheduling and resource access.
    PurgeOnDestroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    ReadAllocationIds bool

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    Region string
    (string) - The target region for the job.
    RerunIfDead bool
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    Stable bool
    (boolean) - Whether the job is stable.
    Status string
    (string) - The current status of the job.
    StatusDescription string
    (string) - Additional status information returned by Nomad.
    Stop bool
    (boolean) - Whether the job is stopped.
    SubmitTime string
    (integer) - The Unix timestamp when the job was submitted.
    TaskGroups []JobTaskGroupArgs
    (list of maps) - A list of the job's task groups.
    Type string
    (string) - Volume type.
    UpdateStrategies []JobUpdateStrategyArgs
    (list of maps) - Effective update strategy for the task group.
    Version int
    (integer) - The current job version.
    allAtOnce Boolean
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    allocationIds List<String>
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    constraints List<JobConstraint>
    (list of maps) - Job constraints.
    createIndex Integer
    (integer) - The job creation index.
    datacenters List<String>
    (set of strings) - The target datacenters for the job.
    deploymentId String
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    deploymentStatus String
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    deregisterOnDestroy Boolean
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    name String
    (string) - Volume name.
    namespace String
    (string) - The namespace of the job, as derived from the jobspec.
    parentId String
    (string) - The parent job ID, if applicable.
    periodicConfigs List<JobPeriodicConfig>
    (list of maps) - The job's periodic configuration.
    policyOverride Boolean
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    preserveCounts Boolean
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    priority Integer
    (integer) - The job priority for scheduling and resource access.
    purgeOnDestroy Boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    readAllocationIds Boolean

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    region String
    (string) - The target region for the job.
    rerunIfDead Boolean
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    stable Boolean
    (boolean) - Whether the job is stable.
    status String
    (string) - The current status of the job.
    statusDescription String
    (string) - Additional status information returned by Nomad.
    stop Boolean
    (boolean) - Whether the job is stopped.
    submitTime String
    (integer) - The Unix timestamp when the job was submitted.
    taskGroups List<JobTaskGroup>
    (list of maps) - A list of the job's task groups.
    type String
    (string) - Volume type.
    updateStrategies List<JobUpdateStrategy>
    (list of maps) - Effective update strategy for the task group.
    version Integer
    (integer) - The current job version.
    allAtOnce boolean
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    allocationIds string[]
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    constraints JobConstraint[]
    (list of maps) - Job constraints.
    createIndex number
    (integer) - The job creation index.
    datacenters string[]
    (set of strings) - The target datacenters for the job.
    deploymentId string
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    deploymentStatus string
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    deregisterOnDestroy boolean
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    name string
    (string) - Volume name.
    namespace string
    (string) - The namespace of the job, as derived from the jobspec.
    parentId string
    (string) - The parent job ID, if applicable.
    periodicConfigs JobPeriodicConfig[]
    (list of maps) - The job's periodic configuration.
    policyOverride boolean
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    preserveCounts boolean
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    priority number
    (integer) - The job priority for scheduling and resource access.
    purgeOnDestroy boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    readAllocationIds boolean

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    region string
    (string) - The target region for the job.
    rerunIfDead boolean
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    stable boolean
    (boolean) - Whether the job is stable.
    status string
    (string) - The current status of the job.
    statusDescription string
    (string) - Additional status information returned by Nomad.
    stop boolean
    (boolean) - Whether the job is stopped.
    submitTime string
    (integer) - The Unix timestamp when the job was submitted.
    taskGroups JobTaskGroup[]
    (list of maps) - A list of the job's task groups.
    type string
    (string) - Volume type.
    updateStrategies JobUpdateStrategy[]
    (list of maps) - Effective update strategy for the task group.
    version number
    (integer) - The current job version.
    all_at_once bool
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    allocation_ids Sequence[str]
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    constraints Sequence[JobConstraintArgs]
    (list of maps) - Job constraints.
    create_index int
    (integer) - The job creation index.
    datacenters Sequence[str]
    (set of strings) - The target datacenters for the job.
    deployment_id str
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    deployment_status str
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    deregister_on_destroy bool
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    name str
    (string) - Volume name.
    namespace str
    (string) - The namespace of the job, as derived from the jobspec.
    parent_id str
    (string) - The parent job ID, if applicable.
    periodic_configs Sequence[JobPeriodicConfigArgs]
    (list of maps) - The job's periodic configuration.
    policy_override bool
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    preserve_counts bool
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    priority int
    (integer) - The job priority for scheduling and resource access.
    purge_on_destroy bool
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    read_allocation_ids bool

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    region str
    (string) - The target region for the job.
    rerun_if_dead bool
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    stable bool
    (boolean) - Whether the job is stable.
    status str
    (string) - The current status of the job.
    status_description str
    (string) - Additional status information returned by Nomad.
    stop bool
    (boolean) - Whether the job is stopped.
    submit_time str
    (integer) - The Unix timestamp when the job was submitted.
    task_groups Sequence[JobTaskGroupArgs]
    (list of maps) - A list of the job's task groups.
    type str
    (string) - Volume type.
    update_strategies Sequence[JobUpdateStrategyArgs]
    (list of maps) - Effective update strategy for the task group.
    version int
    (integer) - The current job version.
    allAtOnce Boolean
    (boolean) - Whether the scheduler can make partial placements on oversubscribed nodes.
    allocationIds List<String>
    (list of strings) - Allocation IDs associated with the job when readAllocationIds = true.

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    constraints List<Property Map>
    (list of maps) - Job constraints.
    createIndex Number
    (integer) - The job creation index.
    datacenters List<String>
    (set of strings) - The target datacenters for the job.
    deploymentId String
    (string) - If detach = false, the deployment associated with the last create or update, if one exists.
    deploymentStatus String
    (string) - If detach = false, the status for the deployment associated with the last create or update, if one exists.
    deregisterOnDestroy Boolean
    (boolean: true) - Determines if the job will be deregistered when this resource is destroyed in Terraform.
    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
    (string) - Integer that increments for each change. Used to detect any changes between plan and apply.
    name String
    (string) - Volume name.
    namespace String
    (string) - The namespace of the job, as derived from the jobspec.
    parentId String
    (string) - The parent job ID, if applicable.
    periodicConfigs List<Property Map>
    (list of maps) - The job's periodic configuration.
    policyOverride Boolean
    (boolean: false) - Determines if the job will override any soft-mandatory Sentinel policies and register even if they fail.
    preserveCounts Boolean
    (boolean: false) - If true, preserves the current task group counts already stored in Nomad during job registration instead of applying the counts from the submitted jobspec.
    priority Number
    (integer) - The job priority for scheduling and resource access.
    purgeOnDestroy Boolean
    (boolean: false) - Set this to true if you want the job to be purged when the resource is destroyed.
    readAllocationIds Boolean

    Deprecated: Retrieving allocation IDs from the job resource is deprecated and will be removed in a future release. Use the nomad.getAllocations data source instead.

    region String
    (string) - The target region for the job.
    rerunIfDead Boolean
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    stable Boolean
    (boolean) - Whether the job is stable.
    status String
    (string) - The current status of the job.
    statusDescription String
    (string) - Additional status information returned by Nomad.
    stop Boolean
    (boolean) - Whether the job is stopped.
    submitTime String
    (integer) - The Unix timestamp when the job was submitted.
    taskGroups List<Property Map>
    (list of maps) - A list of the job's task groups.
    type String
    (string) - Volume type.
    updateStrategies List<Property Map>
    (list of maps) - Effective update strategy for the task group.
    version Number
    (integer) - The current job version.

    Supporting Types

    JobConstraint, JobConstraintArgs

    Ltarget string
    (string) - Attribute being constrained.
    Operand string
    (string) - Operator used to compare the attribute to the constraint.
    Rtarget string
    (string) - Constraint value.
    Ltarget string
    (string) - Attribute being constrained.
    Operand string
    (string) - Operator used to compare the attribute to the constraint.
    Rtarget string
    (string) - Constraint value.
    ltarget String
    (string) - Attribute being constrained.
    operand String
    (string) - Operator used to compare the attribute to the constraint.
    rtarget String
    (string) - Constraint value.
    ltarget string
    (string) - Attribute being constrained.
    operand string
    (string) - Operator used to compare the attribute to the constraint.
    rtarget string
    (string) - Constraint value.
    ltarget str
    (string) - Attribute being constrained.
    operand str
    (string) - Operator used to compare the attribute to the constraint.
    rtarget str
    (string) - Constraint value.
    ltarget String
    (string) - Attribute being constrained.
    operand String
    (string) - Operator used to compare the attribute to the constraint.
    rtarget String
    (string) - Constraint value.

    JobHcl2, JobHcl2Args

    AllowFs bool
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    Vars Dictionary<string, string>
    Additional variables to use when templating the job with HCL2
    AllowFs bool
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    Vars map[string]string
    Additional variables to use when templating the job with HCL2
    allowFs Boolean
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    vars Map<String,String>
    Additional variables to use when templating the job with HCL2
    allowFs boolean
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    vars {[key: string]: string}
    Additional variables to use when templating the job with HCL2
    allow_fs bool
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    vars Mapping[str, str]
    Additional variables to use when templating the job with HCL2
    allowFs Boolean
    (boolean: false) - Set this to true to be able to use HCL2 filesystem functions
    vars Map<String>
    Additional variables to use when templating the job with HCL2

    JobPeriodicConfig, JobPeriodicConfigArgs

    Enabled bool
    (boolean) - Whether the periodic job is enabled. When disabled, scheduled runs and force launches are prevented.
    ProhibitOverlap bool
    (boolean) - Whether this job should wait until previous instances of the same job have completed before launching again.
    Spec string
    (string) - Cron expression configuring the interval at which the job is launched.
    SpecType string
    (string) - Type of periodic specification, such as cron.
    Timezone string
    (string) - Time zone used to evaluate the next launch interval.
    Enabled bool
    (boolean) - Whether the periodic job is enabled. When disabled, scheduled runs and force launches are prevented.
    ProhibitOverlap bool
    (boolean) - Whether this job should wait until previous instances of the same job have completed before launching again.
    Spec string
    (string) - Cron expression configuring the interval at which the job is launched.
    SpecType string
    (string) - Type of periodic specification, such as cron.
    Timezone string
    (string) - Time zone used to evaluate the next launch interval.
    enabled Boolean
    (boolean) - Whether the periodic job is enabled. When disabled, scheduled runs and force launches are prevented.
    prohibitOverlap Boolean
    (boolean) - Whether this job should wait until previous instances of the same job have completed before launching again.
    spec String
    (string) - Cron expression configuring the interval at which the job is launched.
    specType String
    (string) - Type of periodic specification, such as cron.
    timezone String
    (string) - Time zone used to evaluate the next launch interval.
    enabled boolean
    (boolean) - Whether the periodic job is enabled. When disabled, scheduled runs and force launches are prevented.
    prohibitOverlap boolean
    (boolean) - Whether this job should wait until previous instances of the same job have completed before launching again.
    spec string
    (string) - Cron expression configuring the interval at which the job is launched.
    specType string
    (string) - Type of periodic specification, such as cron.
    timezone string
    (string) - Time zone used to evaluate the next launch interval.
    enabled bool
    (boolean) - Whether the periodic job is enabled. When disabled, scheduled runs and force launches are prevented.
    prohibit_overlap bool
    (boolean) - Whether this job should wait until previous instances of the same job have completed before launching again.
    spec str
    (string) - Cron expression configuring the interval at which the job is launched.
    spec_type str
    (string) - Type of periodic specification, such as cron.
    timezone str
    (string) - Time zone used to evaluate the next launch interval.
    enabled Boolean
    (boolean) - Whether the periodic job is enabled. When disabled, scheduled runs and force launches are prevented.
    prohibitOverlap Boolean
    (boolean) - Whether this job should wait until previous instances of the same job have completed before launching again.
    spec String
    (string) - Cron expression configuring the interval at which the job is launched.
    specType String
    (string) - Type of periodic specification, such as cron.
    timezone String
    (string) - Time zone used to evaluate the next launch interval.

    JobTaskGroup, JobTaskGroupArgs

    Count int
    (integer) - Task group count.
    Meta Dictionary<string, string>
    (map of strings) - Task group metadata.
    Name string
    (string) - Volume name.
    Tasks List<JobTaskGroupTask>
    (list of maps) - Tasks in the task group.
    UpdateStrategies List<JobTaskGroupUpdateStrategy>
    (list of maps) - Effective update strategy for the task group.
    Volumes List<JobTaskGroupVolume>
    (list of maps) - Volume requests for the task group.
    Count int
    (integer) - Task group count.
    Meta map[string]string
    (map of strings) - Task group metadata.
    Name string
    (string) - Volume name.
    Tasks []JobTaskGroupTask
    (list of maps) - Tasks in the task group.
    UpdateStrategies []JobTaskGroupUpdateStrategy
    (list of maps) - Effective update strategy for the task group.
    Volumes []JobTaskGroupVolume
    (list of maps) - Volume requests for the task group.
    count Integer
    (integer) - Task group count.
    meta Map<String,String>
    (map of strings) - Task group metadata.
    name String
    (string) - Volume name.
    tasks List<JobTaskGroupTask>
    (list of maps) - Tasks in the task group.
    updateStrategies List<JobTaskGroupUpdateStrategy>
    (list of maps) - Effective update strategy for the task group.
    volumes List<JobTaskGroupVolume>
    (list of maps) - Volume requests for the task group.
    count number
    (integer) - Task group count.
    meta {[key: string]: string}
    (map of strings) - Task group metadata.
    name string
    (string) - Volume name.
    tasks JobTaskGroupTask[]
    (list of maps) - Tasks in the task group.
    updateStrategies JobTaskGroupUpdateStrategy[]
    (list of maps) - Effective update strategy for the task group.
    volumes JobTaskGroupVolume[]
    (list of maps) - Volume requests for the task group.
    count int
    (integer) - Task group count.
    meta Mapping[str, str]
    (map of strings) - Task group metadata.
    name str
    (string) - Volume name.
    tasks Sequence[JobTaskGroupTask]
    (list of maps) - Tasks in the task group.
    update_strategies Sequence[JobTaskGroupUpdateStrategy]
    (list of maps) - Effective update strategy for the task group.
    volumes Sequence[JobTaskGroupVolume]
    (list of maps) - Volume requests for the task group.
    count Number
    (integer) - Task group count.
    meta Map<String>
    (map of strings) - Task group metadata.
    name String
    (string) - Volume name.
    tasks List<Property Map>
    (list of maps) - Tasks in the task group.
    updateStrategies List<Property Map>
    (list of maps) - Effective update strategy for the task group.
    volumes List<Property Map>
    (list of maps) - Volume requests for the task group.

    JobTaskGroupTask, JobTaskGroupTaskArgs

    Driver string
    (string) - Task driver.
    Meta Dictionary<string, string>
    (map of strings) - Task group metadata.
    Name string
    (string) - Volume name.
    VolumeMounts List<JobTaskGroupTaskVolumeMount>
    (list of maps) - Task volume mounts.
    Driver string
    (string) - Task driver.
    Meta map[string]string
    (map of strings) - Task group metadata.
    Name string
    (string) - Volume name.
    VolumeMounts []JobTaskGroupTaskVolumeMount
    (list of maps) - Task volume mounts.
    driver String
    (string) - Task driver.
    meta Map<String,String>
    (map of strings) - Task group metadata.
    name String
    (string) - Volume name.
    volumeMounts List<JobTaskGroupTaskVolumeMount>
    (list of maps) - Task volume mounts.
    driver string
    (string) - Task driver.
    meta {[key: string]: string}
    (map of strings) - Task group metadata.
    name string
    (string) - Volume name.
    volumeMounts JobTaskGroupTaskVolumeMount[]
    (list of maps) - Task volume mounts.
    driver str
    (string) - Task driver.
    meta Mapping[str, str]
    (map of strings) - Task group metadata.
    name str
    (string) - Volume name.
    volume_mounts Sequence[JobTaskGroupTaskVolumeMount]
    (list of maps) - Task volume mounts.
    driver String
    (string) - Task driver.
    meta Map<String>
    (map of strings) - Task group metadata.
    name String
    (string) - Volume name.
    volumeMounts List<Property Map>
    (list of maps) - Task volume mounts.

    JobTaskGroupTaskVolumeMount, JobTaskGroupTaskVolumeMountArgs

    Destination string
    (string) - Destination path inside the task.
    ReadOnly bool
    (boolean) - Whether the volume is read-only.
    Volume string
    (string) - Volume name.
    Destination string
    (string) - Destination path inside the task.
    ReadOnly bool
    (boolean) - Whether the volume is read-only.
    Volume string
    (string) - Volume name.
    destination String
    (string) - Destination path inside the task.
    readOnly Boolean
    (boolean) - Whether the volume is read-only.
    volume String
    (string) - Volume name.
    destination string
    (string) - Destination path inside the task.
    readOnly boolean
    (boolean) - Whether the volume is read-only.
    volume string
    (string) - Volume name.
    destination str
    (string) - Destination path inside the task.
    read_only bool
    (boolean) - Whether the volume is read-only.
    volume str
    (string) - Volume name.
    destination String
    (string) - Destination path inside the task.
    readOnly Boolean
    (boolean) - Whether the volume is read-only.
    volume String
    (string) - Volume name.

    JobTaskGroupUpdateStrategy, JobTaskGroupUpdateStrategyArgs

    AutoRevert bool
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    Canary int
    (integer) - Number of canary allocations created before destructive updates continue.
    HealthCheck string
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    HealthyDeadline string
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    MaxParallel int
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    MinHealthyTime string
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    Stagger string
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    AutoRevert bool
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    Canary int
    (integer) - Number of canary allocations created before destructive updates continue.
    HealthCheck string
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    HealthyDeadline string
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    MaxParallel int
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    MinHealthyTime string
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    Stagger string
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    autoRevert Boolean
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    canary Integer
    (integer) - Number of canary allocations created before destructive updates continue.
    healthCheck String
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    healthyDeadline String
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    maxParallel Integer
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    minHealthyTime String
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    stagger String
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    autoRevert boolean
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    canary number
    (integer) - Number of canary allocations created before destructive updates continue.
    healthCheck string
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    healthyDeadline string
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    maxParallel number
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    minHealthyTime string
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    stagger string
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    auto_revert bool
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    canary int
    (integer) - Number of canary allocations created before destructive updates continue.
    health_check str
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    healthy_deadline str
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    max_parallel int
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    min_healthy_time str
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    stagger str
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    autoRevert Boolean
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    canary Number
    (integer) - Number of canary allocations created before destructive updates continue.
    healthCheck String
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    healthyDeadline String
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    maxParallel Number
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    minHealthyTime String
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    stagger String
    (string) - Delay between each set of maxParallel updates when updating system jobs.

    JobTaskGroupVolume, JobTaskGroupVolumeArgs

    Name string
    (string) - Volume name.
    ReadOnly bool
    (boolean) - Whether the volume is read-only.
    Source string
    (string) - Volume source.
    Type string
    (string) - Volume type.
    Name string
    (string) - Volume name.
    ReadOnly bool
    (boolean) - Whether the volume is read-only.
    Source string
    (string) - Volume source.
    Type string
    (string) - Volume type.
    name String
    (string) - Volume name.
    readOnly Boolean
    (boolean) - Whether the volume is read-only.
    source String
    (string) - Volume source.
    type String
    (string) - Volume type.
    name string
    (string) - Volume name.
    readOnly boolean
    (boolean) - Whether the volume is read-only.
    source string
    (string) - Volume source.
    type string
    (string) - Volume type.
    name str
    (string) - Volume name.
    read_only bool
    (boolean) - Whether the volume is read-only.
    source str
    (string) - Volume source.
    type str
    (string) - Volume type.
    name String
    (string) - Volume name.
    readOnly Boolean
    (boolean) - Whether the volume is read-only.
    source String
    (string) - Volume source.
    type String
    (string) - Volume type.

    JobUpdateStrategy, JobUpdateStrategyArgs

    AutoRevert bool
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    Canary int
    (integer) - Number of canary allocations created before destructive updates continue.
    HealthCheck string
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    HealthyDeadline string
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    MaxParallel int
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    MinHealthyTime string
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    Stagger string
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    AutoRevert bool
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    Canary int
    (integer) - Number of canary allocations created before destructive updates continue.
    HealthCheck string
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    HealthyDeadline string
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    MaxParallel int
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    MinHealthyTime string
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    Stagger string
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    autoRevert Boolean
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    canary Integer
    (integer) - Number of canary allocations created before destructive updates continue.
    healthCheck String
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    healthyDeadline String
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    maxParallel Integer
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    minHealthyTime String
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    stagger String
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    autoRevert boolean
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    canary number
    (integer) - Number of canary allocations created before destructive updates continue.
    healthCheck string
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    healthyDeadline string
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    maxParallel number
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    minHealthyTime string
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    stagger string
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    auto_revert bool
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    canary int
    (integer) - Number of canary allocations created before destructive updates continue.
    health_check str
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    healthy_deadline str
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    max_parallel int
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    min_healthy_time str
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    stagger str
    (string) - Delay between each set of maxParallel updates when updating system jobs.
    autoRevert Boolean
    (boolean) - Whether the job should automatically revert to the last stable job on deployment failure.
    canary Number
    (integer) - Number of canary allocations created before destructive updates continue.
    healthCheck String
    (string) - Mechanism used to determine allocation health: checks, taskStates, or manual.
    healthyDeadline String
    (string) - Deadline by which the allocation must become healthy before it is marked unhealthy.
    maxParallel Number
    (integer) - Number of allocations within a task group that can be destructively updated at the same time. Setting 0 forces updates instead of deployments.
    minHealthyTime String
    (string) - Minimum time the allocation must be in the healthy state before further updates can proceed.
    stagger String
    (string) - Delay between each set of maxParallel updates when updating system jobs.

    Import

    ing Jobs

    Jobs are imported using the pattern <job ID>@<namespace>.

    $ terraform import nomad_job.example example@my-namespace
    nomad_job.example: Importing from ID "example@my-namespace"...
    nomad_job.example: Import prepared!
      Prepared nomad_job for import
    nomad_job.example: Refreshing state... [id=example@my-namespace]
    
    Import successful!
    
    The resources that were imported are shown above. These resources are now in
    your Terraform state and will henceforth be managed by Terraform.
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v2.6.1
    published on Tuesday, Apr 21, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.