oci_batch_batch_context

This resource provides the Batch Context resource in Oracle Cloud Infrastructure Batch service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/

Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/batch

Creates a batch context.

Example Usage

resource "oci_batch_batch_context" "test_batch_context" {
	#Required
	compartment_id = var.compartment_id
	fleets {
		#Required
		max_concurrent_tasks = var.batch_context_fleets_max_concurrent_tasks
		name = var.batch_context_fleets_name
		shape {
			#Required
			memory_in_gbs = var.batch_context_fleets_shape_memory_in_gbs
			ocpus = var.batch_context_fleets_shape_ocpus
			shape_name = oci_core_shape.test_shape.name
		}
		type = var.batch_context_fleets_type
	}
	network {
		#Required
		subnet_id = oci_core_subnet.test_subnet.id

		#Optional
		nsg_ids = var.batch_context_network_nsg_ids
	}

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	description = var.batch_context_description
	display_name = var.batch_context_display_name
	entitlements = var.batch_context_entitlements
	freeform_tags = {"Department"= "Finance"}
	job_priority_configurations {
		#Required
		tag_key = var.batch_context_job_priority_configurations_tag_key
		tag_namespace = var.batch_context_job_priority_configurations_tag_namespace
		values = var.batch_context_job_priority_configurations_values
		weight = var.batch_context_job_priority_configurations_weight
	}
	logging_configuration {
		#Required
		log_group_id = oci_logging_log_group.test_log_group.id
		log_id = oci_apm_traces_log.test_log.id
		type = var.batch_context_logging_configuration_type
	}
}

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 Batch Context * update - (Defaults to 20 minutes), when updating the Batch Context * delete - (Defaults to 20 minutes), when destroying the Batch Context

Import

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

$ terraform import oci_batch_batch_context.test_batch_context "id"