1. Packages
  2. HashiCorp Nomad
  3. API Docs
  4. Job
Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi

nomad.Job

Explore with Pulumi AI

nomad logo
Nomad v2.3.0 published on Wednesday, Jun 5, 2024 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,
            detach: Optional[bool] = None,
            deregister_on_id_change: Optional[bool] = None,
            consul_token: Optional[str] = None,
            hcl1: Optional[bool] = None,
            hcl2: Optional[JobHcl2Args] = None,
            deregister_on_destroy: Optional[bool] = None,
            json: Optional[bool] = None,
            policy_override: Optional[bool] = None,
            purge_on_destroy: Optional[bool] = None,
            read_allocation_ids: Optional[bool] = None,
            rerun_if_dead: 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.

    Example

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

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

    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.
    Hcl1 bool
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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.
    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.
    Hcl1 bool
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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.
    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.
    hcl1 Boolean
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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.
    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.
    hcl1 boolean
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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.
    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.
    hcl1 bool
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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.
    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.
    hcl1 Boolean
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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.
    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.

    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.

    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.
    Status string
    The status of the job.
    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.

    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.

    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.
    Status string
    The status of the job.
    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.

    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.

    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.
    status String
    The status of the job.
    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.

    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.

    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.
    status string
    The status of the job.
    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.

    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.

    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.
    status str
    The status of the job.
    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.

    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.

    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.
    status String
    The status of the job.
    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,
            hcl1: 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,
            read_allocation_ids: Optional[bool] = None,
            region: Optional[str] = None,
            rerun_if_dead: Optional[bool] = None,
            status: 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)
    Resource lookup is not supported in YAML
    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.

    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.

    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.
    Hcl1 bool
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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
    The target region for the job, as derived from the jobspec.
    RerunIfDead bool
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    Status string
    The status of the job.
    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.

    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.

    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.
    Hcl1 bool
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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
    The target region for the job, as derived from the jobspec.
    RerunIfDead bool
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    Status string
    The status of the job.
    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.

    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.

    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.
    hcl1 Boolean
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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
    The target region for the job, as derived from the jobspec.
    rerunIfDead Boolean
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    status String
    The status of the job.
    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.

    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.

    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.
    hcl1 boolean
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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
    The target region for the job, as derived from the jobspec.
    rerunIfDead boolean
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    status string
    The status of the job.
    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.

    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.

    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.
    hcl1 bool
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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
    The target region for the job, as derived from the jobspec.
    rerun_if_dead bool
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    status str
    The status of the job.
    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.

    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.

    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.
    hcl1 Boolean
    (boolean: false) - Set this to true to use the previous HCL1 parser. This option is provided for backwards compatibility only and should not be used unless absolutely necessary.
    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.
    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
    The target region for the job, as derived from the jobspec.
    rerunIfDead Boolean
    (boolean: false) - Set this to true to force the job to run again if its status is dead.
    status String
    The status of the job.
    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) - Deprecated All HCL jobs are parsed as HCL2 by default.

    Deprecated: Starting with version 2.0.0 of the Nomad provider, jobs are parsed using HCL2 by default, so this field is no longer used and may be safely removed from your configuration files. Set 'hcl1 = true' if you must use HCL1 job parsing.

    Vars Dictionary<string, object>
    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
    Enabled bool
    (boolean: false) - Deprecated All HCL jobs are parsed as HCL2 by default.

    Deprecated: Starting with version 2.0.0 of the Nomad provider, jobs are parsed using HCL2 by default, so this field is no longer used and may be safely removed from your configuration files. Set 'hcl1 = true' if you must use HCL1 job parsing.

    Vars map[string]interface{}
    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
    enabled Boolean
    (boolean: false) - Deprecated All HCL jobs are parsed as HCL2 by default.

    Deprecated: Starting with version 2.0.0 of the Nomad provider, jobs are parsed using HCL2 by default, so this field is no longer used and may be safely removed from your configuration files. Set 'hcl1 = true' if you must use HCL1 job parsing.

    vars Map<String,Object>
    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
    enabled boolean
    (boolean: false) - Deprecated All HCL jobs are parsed as HCL2 by default.

    Deprecated: Starting with version 2.0.0 of the Nomad provider, jobs are parsed using HCL2 by default, so this field is no longer used and may be safely removed from your configuration files. Set 'hcl1 = true' if you must use HCL1 job parsing.

    vars {[key: string]: any}
    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
    enabled bool
    (boolean: false) - Deprecated All HCL jobs are parsed as HCL2 by default.

    Deprecated: Starting with version 2.0.0 of the Nomad provider, jobs are parsed using HCL2 by default, so this field is no longer used and may be safely removed from your configuration files. Set 'hcl1 = true' if you must use HCL1 job parsing.

    vars Mapping[str, Any]
    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
    enabled Boolean
    (boolean: false) - Deprecated All HCL jobs are parsed as HCL2 by default.

    Deprecated: Starting with version 2.0.0 of the Nomad provider, jobs are parsed using HCL2 by default, so this field is no longer used and may be safely removed from your configuration files. Set 'hcl1 = true' if you must use HCL1 job parsing.

    vars Map<Any>
    Additional variables to use when templating the job with HCL2

    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
    Nomad v2.3.0 published on Wednesday, Jun 5, 2024 by Pulumi