oci_metering_computation_schedule

This resource provides the Schedule resource in Oracle Cloud Infrastructure Metering Computation service.

Returns the created schedule.

Example Usage

resource "oci_metering_computation_schedule" "test_schedule" {
	#Required
	compartment_id = var.compartment_id
	name = var.schedule_name
	result_location {
		#Required
		bucket = var.schedule_result_location_bucket
		location_type = var.schedule_result_location_location_type
		namespace = var.schedule_result_location_namespace
		region = var.schedule_result_location_region
	}
	schedule_recurrences = var.schedule_schedule_recurrences
	time_scheduled = var.schedule_time_scheduled

	#Optional
	defined_tags = {"foo-namespace.bar-key"= "value"}
	description = var.schedule_description
	freeform_tags = {"bar-key"= "value"}
	output_file_format = var.schedule_output_file_format
	query_properties {
		#Required
		date_range {
			#Required
			date_range_type = var.schedule_query_properties_date_range_date_range_type

			#Optional
			dynamic_date_range_type = var.schedule_query_properties_date_range_dynamic_date_range_type
			time_usage_ended = var.schedule_query_properties_date_range_time_usage_ended
			time_usage_started = var.schedule_query_properties_date_range_time_usage_started
		}
		granularity = var.schedule_query_properties_granularity

		#Optional
		compartment_depth = var.schedule_query_properties_compartment_depth
		filter = var.schedule_query_properties_filter
		group_by = var.schedule_query_properties_group_by
		group_by_tag {

			#Optional
			key = var.schedule_query_properties_group_by_tag_key
			namespace = var.schedule_query_properties_group_by_tag_namespace
			value = var.schedule_query_properties_group_by_tag_value
		}
		is_aggregate_by_time = var.schedule_query_properties_is_aggregate_by_time
		query_type = var.schedule_query_properties_query_type
	}
	saved_report_id = oci_data_safe_report.test_report.id
}

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

Import

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

$ terraform import oci_metering_computation_schedule.test_schedule "id"