oci_datascience_job_run
This resource provides the Job Run resource in Oracle Cloud Infrastructure Data Science service.
Creates a job run.
Example Usage
resource "oci_datascience_job_run" "test_job_run" {
#Required
compartment_id = var.compartment_id
job_id = oci_datascience_job.test_job.id
project_id = oci_datascience_project.test_project.id
#Optional
asynchronous = var.asynchronous
defined_tags = {"Operations.CostCenter"= "42"}
display_name = var.job_run_display_name
freeform_tags = {"Department"= "Finance"}
job_configuration_override_details {
#Required
job_type = var.job_run_job_configuration_override_details_job_type
#Optional
command_line_arguments = var.job_run_job_configuration_override_details_command_line_arguments
environment_variables = var.job_run_job_configuration_override_details_environment_variables
maximum_runtime_in_minutes = var.job_run_job_configuration_override_details_maximum_runtime_in_minutes
startup_probe_details {
#Required
command = var.job_run_job_configuration_override_details_startup_probe_details_command
job_probe_check_type = var.job_run_job_configuration_override_details_startup_probe_details_job_probe_check_type
#Optional
failure_threshold = var.job_run_job_configuration_override_details_startup_probe_details_failure_threshold
initial_delay_in_seconds = var.job_run_job_configuration_override_details_startup_probe_details_initial_delay_in_seconds
period_in_seconds = var.job_run_job_configuration_override_details_startup_probe_details_period_in_seconds
}
}
job_environment_configuration_override_details {
#Required
image = var.job_run_job_environment_configuration_override_details_image
job_environment_type = var.job_run_job_environment_configuration_override_details_job_environment_type
#Optional
cmd = var.job_run_job_environment_configuration_override_details_cmd
entrypoint = var.job_run_job_environment_configuration_override_details_entrypoint
image_digest = var.job_run_job_environment_configuration_override_details_image_digest
image_signature_id = oci_datascience_image_signature.test_image_signature.id
}
job_infrastructure_configuration_override_details {
#Required
job_infrastructure_type = var.job_run_job_infrastructure_configuration_override_details_job_infrastructure_type
#Optional
block_storage_size_in_gbs = var.job_run_job_infrastructure_configuration_override_details_block_storage_size_in_gbs
job_shape_config_details {
#Optional
memory_in_gbs = var.job_run_job_infrastructure_configuration_override_details_job_shape_config_details_memory_in_gbs
ocpus = var.job_run_job_infrastructure_configuration_override_details_job_shape_config_details_ocpus
}
shape_name = oci_core_shape.test_shape.name
subnet_id = oci_core_subnet.test_subnet.id
}
job_log_configuration_override_details {
#Optional
enable_auto_log_creation = var.job_run_job_log_configuration_override_details_enable_auto_log_creation
enable_logging = var.job_run_job_log_configuration_override_details_enable_logging
log_group_id = oci_logging_log_group.test_log_group.id
log_id = oci_logging_log.test_log.id
}
job_node_configuration_override_details {
#Required
job_node_type = var.job_run_job_node_configuration_override_details_job_node_type
#Optional
job_network_configuration {
#Required
job_network_type = var.job_run_job_node_configuration_override_details_job_network_configuration_job_network_type
#Optional
subnet_id = oci_core_subnet.test_subnet.id
}
job_node_group_configuration_details_list {
#Required
name = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_name
#Optional
job_configuration_details {
#Required
job_type = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_configuration_details_job_type
#Optional
command_line_arguments = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_configuration_details_command_line_arguments
environment_variables = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_configuration_details_environment_variables
maximum_runtime_in_minutes = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_configuration_details_maximum_runtime_in_minutes
startup_probe_details {
#Required
command = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_configuration_details_startup_probe_details_command
job_probe_check_type = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_configuration_details_startup_probe_details_job_probe_check_type
#Optional
failure_threshold = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_configuration_details_startup_probe_details_failure_threshold
initial_delay_in_seconds = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_configuration_details_startup_probe_details_initial_delay_in_seconds
period_in_seconds = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_configuration_details_startup_probe_details_period_in_seconds
}
}
job_environment_configuration_details {
#Required
image = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_environment_configuration_details_image
job_environment_type = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_environment_configuration_details_job_environment_type
#Optional
cmd = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_environment_configuration_details_cmd
entrypoint = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_environment_configuration_details_entrypoint
image_digest = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_environment_configuration_details_image_digest
image_signature_id = oci_datascience_image_signature.test_image_signature.id
}
job_infrastructure_configuration_details {
#Required
job_infrastructure_type = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_infrastructure_configuration_details_job_infrastructure_type
#Optional
block_storage_size_in_gbs = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_infrastructure_configuration_details_block_storage_size_in_gbs
job_shape_config_details {
#Optional
memory_in_gbs = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_infrastructure_configuration_details_job_shape_config_details_memory_in_gbs
ocpus = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_job_infrastructure_configuration_details_job_shape_config_details_ocpus
}
shape_name = oci_core_shape.test_shape.name
subnet_id = oci_core_subnet.test_subnet.id
}
minimum_success_replicas = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_minimum_success_replicas
replicas = var.job_run_job_node_configuration_override_details_job_node_group_configuration_details_list_replicas
}
maximum_runtime_in_minutes = var.job_run_job_node_configuration_override_details_maximum_runtime_in_minutes
startup_order = var.job_run_job_node_configuration_override_details_startup_order
}
opc_parent_rpt_url = var.job_run_opc_parent_rpt_url
}
Argument Reference
The following arguments are supported:
asynchronous
- (Optional) If set to true, do not wait for the JobRun to reach completion prior to returning. Can be useful for JobRuns with a long duration.compartment_id
- (Required) (Updatable) The OCID of the compartment where you want to create the job.defined_tags
- (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:{"Operations.CostCenter": "42"}
display_name
- (Optional) (Updatable) A user-friendly display name for the resource.freeform_tags
- (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags. Example:{"Department": "Finance"}
job_configuration_override_details
- (Optional) The job configuration detailscommand_line_arguments
- (Applicable when job_type=DEFAULT) The arguments to pass to the job.environment_variables
- (Applicable when job_type=DEFAULT) Environment variables to set for the job.job_type
- (Required) The type of job.maximum_runtime_in_minutes
- (Applicable when job_type=DEFAULT) A time bound for the execution of the job. Timer starts when the job becomes active.startup_probe_details
- (Applicable when job_type=DEFAULT) The probe indicates whether the application within the job run has started.command
- (Required) The commands to run in the target job run to perform the startup probefailure_threshold
- (Optional) How many times the job will try before giving up when a probe fails.initial_delay_in_seconds
- (Optional) Number of seconds after the job run has started before a startup probe is initiated.job_probe_check_type
- (Required) The probe check type to perform the startup probe and specifies the type of health check for a job.period_in_seconds
- (Optional) Number of seconds how often the job run should perform a startup probe
job_environment_configuration_override_details
- (Optional) Environment configuration to capture job runtime dependencies.cmd
- (Optional) The container image run CMD as a list of strings. UseCMD
as arguments to theENTRYPOINT
or the only command to run in the absence of anENTRYPOINT
. The combined size ofCMD
andENTRYPOINT
must be less than 2048 bytes.entrypoint
- (Optional) The container image run ENTRYPOINT as a list of strings. Accept theCMD
as extra arguments. The combined size ofCMD
andENTRYPOINT
must be less than 2048 bytes. More information on howCMD
andENTRYPOINT
interact are here.image
- (Required) The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format. Acceptable format:<region>.ocir.io/<registry>/<image>:<tag>
<region>.ocir.io/<registry>/<image>:<tag>@digest
image_digest
- (Optional) The digest of the container image. For example,sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030
image_signature_id
- (Optional) OCID of the container image signaturejob_environment_type
- (Required) The environment configuration type used for job runtime.
job_id
- (Required) The OCID of the job to create a run for.job_infrastructure_configuration_override_details
- (Optional) The job infrastructure configuration details (shape, block storage, etc.)block_storage_size_in_gbs
- (Required when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) The size of the block storage volume to attach to the instance running the jobjob_infrastructure_type
- (Required) The infrastructure type used for job run.job_shape_config_details
- (Applicable when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) Details for the job run shape configuration. Specify only when a flex shape is selected.memory_in_gbs
- (Applicable when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) The total amount of memory available to the job run instance, in gigabytes.ocpus
- (Applicable when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) The total number of OCPUs available to the job run instance.
shape_name
- (Required when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) The name that corresponds to the JobShapeSummary to use for the job nodesubnet_id
- (Required when job_infrastructure_type=STANDALONE) The subnet to create a secondary vnic in to attach to the instance running the job
job_log_configuration_override_details
- (Optional) Logging configuration for resource.enable_auto_log_creation
- (Optional) If automatic on-behalf-of log object creation is enabled for job runs.enable_logging
- (Optional) If customer logging is enabled for job runs.log_group_id
- (Optional) The log group id for where log objects are for job runs.log_id
- (Optional) The log id the job run will push logs too.
job_node_configuration_override_details
- (Optional) The job node configuration detailsjob_network_configuration
- (Optional) The job network configuration detailsjob_network_type
- (Required) job network typesubnet_id
- (Required when job_network_type=CUSTOM_NETWORK) The custom subnet id
job_node_group_configuration_details_list
- (Optional) List of JobNodeGroupConfigurationDetailsjob_configuration_details
- (Optional) The job configuration detailscommand_line_arguments
- (Applicable when job_type=DEFAULT) The arguments to pass to the job.environment_variables
- (Applicable when job_type=DEFAULT) Environment variables to set for the job.job_type
- (Required) The type of job.maximum_runtime_in_minutes
- (Applicable when job_type=DEFAULT) A time bound for the execution of the job. Timer starts when the job becomes active.startup_probe_details
- (Applicable when job_type=DEFAULT) The probe indicates whether the application within the job run has started.command
- (Required) The commands to run in the target job run to perform the startup probefailure_threshold
- (Optional) How many times the job will try before giving up when a probe fails.initial_delay_in_seconds
- (Optional) Number of seconds after the job run has started before a startup probe is initiated.job_probe_check_type
- (Required) The probe check type to perform the startup probe and specifies the type of health check for a job.period_in_seconds
- (Optional) Number of seconds how often the job run should perform a startup probe
job_environment_configuration_details
- (Optional) Environment configuration to capture job runtime dependencies.cmd
- (Optional) The container image run CMD as a list of strings. UseCMD
as arguments to theENTRYPOINT
or the only command to run in the absence of anENTRYPOINT
. The combined size ofCMD
andENTRYPOINT
must be less than 2048 bytes.entrypoint
- (Optional) The container image run ENTRYPOINT as a list of strings. Accept theCMD
as extra arguments. The combined size ofCMD
andENTRYPOINT
must be less than 2048 bytes. More information on howCMD
andENTRYPOINT
interact are here.image
- (Required) The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format. Acceptable format:<region>.ocir.io/<registry>/<image>:<tag>
<region>.ocir.io/<registry>/<image>:<tag>@digest
image_digest
- (Optional) The digest of the container image. For example,sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030
image_signature_id
- (Optional) OCID of the container image signaturejob_environment_type
- (Required) The environment configuration type used for job runtime.
job_infrastructure_configuration_details
- (Optional) The job infrastructure configuration details (shape, block storage, etc.)block_storage_size_in_gbs
- (Required when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) The size of the block storage volume to attach to the instance running the jobjob_infrastructure_type
- (Required) The infrastructure type used for job run.job_shape_config_details
- (Applicable when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) Details for the job run shape configuration. Specify only when a flex shape is selected.memory_in_gbs
- (Applicable when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) The total amount of memory available to the job run instance, in gigabytes.ocpus
- (Applicable when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) The total number of OCPUs available to the job run instance.
shape_name
- (Required when job_infrastructure_type=ME_STANDALONE | MULTI_NODE | STANDALONE) The name that corresponds to the JobShapeSummary to use for the job nodesubnet_id
- (Required when job_infrastructure_type=STANDALONE) The subnet to create a secondary vnic in to attach to the instance running the job
minimum_success_replicas
- (Optional) The minimum threshold of successful replicas for node group to be successful. All replicas need to succeed if this is not specified.name
- (Required) node group name.replicas
- (Optional) The number of nodes.
job_node_type
- (Required) The node type used for job run.maximum_runtime_in_minutes
- (Optional) A time bound for the execution of the job run. Timer starts when the job run is in progress.startup_order
- (Optional) The execution order of node groups
opc_parent_rpt_url
- (Optional) URL to fetch the Resource Principal Token from the parent resource.project_id
- (Required) The OCID of the project to associate the job run with.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Attributes Reference
The following attributes are exported:
compartment_id
- The OCID of the compartment where you want to create the job run.created_by
- The OCID of the user who created the job run.defined_tags
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:{"Operations.CostCenter": "42"}
display_name
- A user-friendly display name for the resource.freeform_tags
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags. Example:{"Department": "Finance"}
id
- The OCID of the job run.job_configuration_override_details
- The job configuration detailscommand_line_arguments
- The arguments to pass to the job.environment_variables
- Environment variables to set for the job.job_type
- The type of job.maximum_runtime_in_minutes
- A time bound for the execution of the job. Timer starts when the job becomes active.startup_probe_details
- The probe indicates whether the application within the job run has started.command
- The commands to run in the target job run to perform the startup probefailure_threshold
- How many times the job will try before giving up when a probe fails.initial_delay_in_seconds
- Number of seconds after the job run has started before a startup probe is initiated.job_probe_check_type
- The probe check type to perform the startup probe and specifies the type of health check for a job.period_in_seconds
- Number of seconds how often the job run should perform a startup probe
job_environment_configuration_override_details
- Environment configuration to capture job runtime dependencies.cmd
- The container image run CMD as a list of strings. UseCMD
as arguments to theENTRYPOINT
or the only command to run in the absence of anENTRYPOINT
. The combined size ofCMD
andENTRYPOINT
must be less than 2048 bytes.entrypoint
- The container image run ENTRYPOINT as a list of strings. Accept theCMD
as extra arguments. The combined size ofCMD
andENTRYPOINT
must be less than 2048 bytes. More information on howCMD
andENTRYPOINT
interact are here.image
- The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format. Acceptable format:<region>.ocir.io/<registry>/<image>:<tag>
<region>.ocir.io/<registry>/<image>:<tag>@digest
image_digest
- The digest of the container image. For example,sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030
image_signature_id
- OCID of the container image signaturejob_environment_type
- The environment configuration type used for job runtime.
job_id
- The OCID of the job.job_infrastructure_configuration_details
- The job infrastructure configuration details (shape, block storage, etc.)block_storage_size_in_gbs
- The size of the block storage volume to attach to the instance running the jobjob_infrastructure_type
- The infrastructure type used for job run.job_shape_config_details
- Details for the job run shape configuration. Specify only when a flex shape is selected.cpu_baseline
- The baseline OCPU utilization for a subcore burstable VM instance. If this attribute is left blank, it will default toBASELINE_1_1
. The following values are supported: BASELINE_1_8 - baseline usage is 1⁄8 of an OCPU. BASELINE_1_2 - baseline usage is 1⁄2 of an OCPU. BASELINE_1_1 - baseline usage is an entire OCPU. This represents a non-burstable instance.memory_in_gbs
- The total amount of memory available to the job run instance, in gigabytes.ocpus
- The total number of OCPUs available to the job run instance.
shape_name
- The name that corresponds to the JobShapeSummary to use for the job nodesubnet_id
- The subnet to create a secondary vnic in to attach to the instance running the job
job_infrastructure_configuration_override_details
- The job infrastructure configuration details (shape, block storage, etc.)block_storage_size_in_gbs
- The size of the block storage volume to attach to the instance running the jobjob_infrastructure_type
- The infrastructure type used for job run.job_shape_config_details
- Details for the job run shape configuration. Specify only when a flex shape is selected.memory_in_gbs
- The total amount of memory available to the job run instance, in gigabytes.ocpus
- The total number of OCPUs available to the job run instance.
shape_name
- The name that corresponds to the JobShapeSummary to use for the job nodesubnet_id
- The subnet to create a secondary vnic in to attach to the instance running the job
job_log_configuration_override_details
- Logging configuration for resource.enable_auto_log_creation
- If automatic on-behalf-of log object creation is enabled for job runs.enable_logging
- If customer logging is enabled for job runs.log_group_id
- The log group id for where log objects are for job runs.log_id
- The log id the job run will push logs too.
job_node_configuration_override_details
- The job node configuration detailsjob_network_configuration
- The job network configuration detailsjob_network_type
- job network typesubnet_id
- The custom subnet id
job_node_group_configuration_details_list
- List of JobNodeGroupConfigurationDetailsjob_configuration_details
- The job configuration detailscommand_line_arguments
- The arguments to pass to the job.environment_variables
- Environment variables to set for the job.job_type
- The type of job.maximum_runtime_in_minutes
- A time bound for the execution of the job. Timer starts when the job becomes active.startup_probe_details
- The probe indicates whether the application within the job run has started.command
- The commands to run in the target job run to perform the startup probefailure_threshold
- How many times the job will try before giving up when a probe fails.initial_delay_in_seconds
- Number of seconds after the job run has started before a startup probe is initiated.job_probe_check_type
- The probe check type to perform the startup probe and specifies the type of health check for a job.period_in_seconds
- Number of seconds how often the job run should perform a startup probe
job_environment_configuration_details
- Environment configuration to capture job runtime dependencies.cmd
- The container image run CMD as a list of strings. UseCMD
as arguments to theENTRYPOINT
or the only command to run in the absence of anENTRYPOINT
. The combined size ofCMD
andENTRYPOINT
must be less than 2048 bytes.entrypoint
- The container image run ENTRYPOINT as a list of strings. Accept theCMD
as extra arguments. The combined size ofCMD
andENTRYPOINT
must be less than 2048 bytes. More information on howCMD
andENTRYPOINT
interact are here.image
- The full path to the Oracle Container Repository (OCIR) registry, image, and tag in a canonical format. Acceptable format:<region>.ocir.io/<registry>/<image>:<tag>
<region>.ocir.io/<registry>/<image>:<tag>@digest
image_digest
- The digest of the container image. For example,sha256:881303a6b2738834d795a32b4a98eb0e5e3d1cad590a712d1e04f9b2fa90a030
image_signature_id
- OCID of the container image signaturejob_environment_type
- The environment configuration type used for job runtime.
job_infrastructure_configuration_details
- The job infrastructure configuration details (shape, block storage, etc.)block_storage_size_in_gbs
- The size of the block storage volume to attach to the instance running the jobjob_infrastructure_type
- The infrastructure type used for job run.job_shape_config_details
- Details for the job run shape configuration. Specify only when a flex shape is selected.memory_in_gbs
- The total amount of memory available to the job run instance, in gigabytes.ocpus
- The total number of OCPUs available to the job run instance.
shape_name
- The name that corresponds to the JobShapeSummary to use for the job nodesubnet_id
- The subnet to create a secondary vnic in to attach to the instance running the job
minimum_success_replicas
- The minimum threshold of successful replicas for node group to be successful. All replicas need to succeed if this is not specified.name
- node group name.replicas
- The number of nodes.
job_node_type
- The node type used for job run.maximum_runtime_in_minutes
- A time bound for the execution of the job run. Timer starts when the job run is in progress.startup_order
- The execution order of node groups
job_storage_mount_configuration_details_list
- Collection of JobStorageMountConfigurationDetails.bucket
- The object storage bucketdestination_directory_name
- The local directory name to be mounteddestination_path
- The local path of the mounted directory, excluding directory name.export_id
- OCID of the exportmount_target_id
- OCID of the mount targetnamespace
- The object storage namespaceprefix
- Prefix in the bucket to mountstorage_type
- The type of storage.
lifecycle_details
- Details of the state of the job run.log_details
- Customer logging details for job run.log_group_id
- The log group id for where log objects will be for job runs.log_id
- The log id of the log object the job run logs will be shipped to.
node_group_details_list
- Collection of NodeGroupDetailslifecycle_details
- The state details of the node group.name
- node group name.state
- The state of the node group.
project_id
- The OCID of the project to associate the job run with.state
- The state of the job run.time_accepted
- The date and time the job run was accepted in the timestamp format defined by RFC3339.time_finished
- The date and time the job run request was finished in the timestamp format defined by RFC3339.time_started
- The date and time the job run request was started in the timestamp format defined by RFC3339.
Timeouts
The timeouts
block allows you to specify timeouts for certain operations:
* create
- (Defaults to 20 minutes), when creating the Job Run
* update
- (Defaults to 20 minutes), when updating the Job Run
* delete
- (Defaults to 20 minutes), when destroying the Job Run
Import
JobRuns can be imported using the id
, e.g.
$ terraform import oci_datascience_job_run.test_job_run "id"