oci_os_management_hub_scheduled_job

This resource provides the Scheduled Job resource in Oracle Cloud Infrastructure Os Management Hub service.

Creates a new scheduled job.

Example Usage

resource "oci_os_management_hub_scheduled_job" "test_scheduled_job" {
	#Required
	compartment_id = var.compartment_id
	operations {
		#Required
		operation_type = var.scheduled_job_operations_operation_type

		#Optional
		manage_module_streams_details {

			#Optional
			disable {
				#Required
				module_name = var.scheduled_job_operations_manage_module_streams_details_disable_module_name
				stream_name = oci_streaming_stream.test_stream.name

				#Optional
				software_source_id = oci_os_management_hub_software_source.test_software_source.id
			}
			enable {
				#Required
				module_name = var.scheduled_job_operations_manage_module_streams_details_enable_module_name
				stream_name = oci_streaming_stream.test_stream.name

				#Optional
				software_source_id = oci_os_management_hub_software_source.test_software_source.id
			}
			install {
				#Required
				module_name = var.scheduled_job_operations_manage_module_streams_details_install_module_name
				profile_name = oci_os_management_hub_profile.test_profile.name
				stream_name = oci_streaming_stream.test_stream.name

				#Optional
				software_source_id = oci_os_management_hub_software_source.test_software_source.id
			}
			remove {
				#Required
				module_name = var.scheduled_job_operations_manage_module_streams_details_remove_module_name
				profile_name = oci_os_management_hub_profile.test_profile.name
				stream_name = oci_streaming_stream.test_stream.name

				#Optional
				software_source_id = oci_os_management_hub_software_source.test_software_source.id
			}
		}
		package_names = var.scheduled_job_operations_package_names
		software_source_ids = var.scheduled_job_operations_software_source_ids
		switch_module_streams_details {
			#Required
			module_name = var.scheduled_job_operations_switch_module_streams_details_module_name
			stream_name = oci_streaming_stream.test_stream.name

			#Optional
			software_source_id = oci_os_management_hub_software_source.test_software_source.id
		}
		windows_update_names = var.scheduled_job_operations_windows_update_names
	}
	schedule_type = var.scheduled_job_schedule_type
	time_next_execution = var.scheduled_job_time_next_execution

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	description = var.scheduled_job_description
	display_name = var.scheduled_job_display_name
	freeform_tags = {"Department"= "Finance"}
	is_managed_by_autonomous_linux = var.scheduled_job_is_managed_by_autonomous_linux
	is_subcompartment_included = var.scheduled_job_is_subcompartment_included
	lifecycle_stage_ids = var.scheduled_job_lifecycle_stage_ids
	locations = var.scheduled_job_locations
	managed_compartment_ids = var.scheduled_job_managed_compartment_ids
	managed_instance_group_ids = var.scheduled_job_managed_instance_group_ids
	managed_instance_ids = var.scheduled_job_managed_instance_ids
	recurring_rule = var.scheduled_job_recurring_rule
	retry_intervals = var.scheduled_job_retry_intervals
}

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

Import

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

$ terraform import oci_os_management_hub_scheduled_job.test_scheduled_job "id"