oci_datascience_job

This resource provides the Job resource in Oracle Cloud Infrastructure Data Science service.

Creates a job.

Example Usage

resource "oci_datascience_job" "test_job" {
	#Required
	compartment_id = var.compartment_id
	job_configuration_details {
		#Required
		job_type = var.job_job_configuration_details_job_type

		#Optional
		command_line_arguments = var.job_job_configuration_details_command_line_arguments
		environment_variables = var.job_job_configuration_details_environment_variables
		maximum_runtime_in_minutes = var.job_job_configuration_details_maximum_runtime_in_minutes
	}
	job_infrastructure_configuration_details {
		#Required
		block_storage_size_in_gbs = var.job_job_infrastructure_configuration_details_block_storage_size_in_gbs
		job_infrastructure_type = var.job_job_infrastructure_configuration_details_job_infrastructure_type
		shape_name = oci_core_shape.test_shape.name

		#Optional
		job_shape_config_details {

			#Optional
			memory_in_gbs = var.job_job_infrastructure_configuration_details_job_shape_config_details_memory_in_gbs
			ocpus = var.job_job_infrastructure_configuration_details_job_shape_config_details_ocpus
		}
		subnet_id = oci_core_subnet.test_subnet.id
	}
	project_id = oci_datascience_project.test_project.id

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	description = var.job_description
	display_name = var.job_display_name
	freeform_tags = {"Department"= "Finance"}
	job_environment_configuration_details {
		#Required
		image = var.job_job_environment_configuration_details_image
		job_environment_type = var.job_job_environment_configuration_details_job_environment_type

		#Optional
		cmd = var.job_job_environment_configuration_details_cmd
		entrypoint = var.job_job_environment_configuration_details_entrypoint
		image_digest = var.job_job_environment_configuration_details_image_digest
		image_signature_id = oci_datascience_image_signature.test_image_signature.id
	}
	job_log_configuration_details {

		#Optional
		enable_auto_log_creation = var.job_job_log_configuration_details_enable_auto_log_creation
		enable_logging = var.job_job_log_configuration_details_enable_logging
		log_group_id = oci_logging_log_group.test_log_group.id
		log_id = oci_logging_log.test_log.id
	}
	job_storage_mount_configuration_details_list {
		#Required
		destination_directory_name = var.job_job_storage_mount_configuration_details_list_destination_directory_name
		storage_type = var.job_job_storage_mount_configuration_details_list_storage_type

		#Optional
		bucket = var.job_job_storage_mount_configuration_details_list_bucket
		destination_path = var.job_job_storage_mount_configuration_details_list_destination_path
		export_id = oci_file_storage_export.test_export.id
		mount_target_id = oci_file_storage_mount_target.test_mount_target.id
		namespace = var.job_job_storage_mount_configuration_details_list_namespace
		prefix = var.job_job_storage_mount_configuration_details_list_prefix
	}
}

Argument Reference

The following arguments are supported:

** 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:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Job * update - (Defaults to 20 minutes), when updating the Job * delete - (Defaults to 20 minutes), when destroying the Job

Import

Jobs can be imported using the id, e.g.

$ terraform import oci_datascience_job.test_job "id"