oci_metering_computation_usage_carbon_emissions_query

This resource provides the Usage Carbon Emissions Query resource in Oracle Cloud Infrastructure Metering Computation service.

Returns the created usage carbon emissions query.

Example Usage

resource "oci_metering_computation_usage_carbon_emissions_query" "test_usage_carbon_emissions_query" {
	#Required
	compartment_id = var.compartment_id
	query_definition {
		#Required
		cost_analysis_ui {

			#Optional
			graph = var.usage_carbon_emissions_query_query_definition_cost_analysis_ui_graph
			is_cumulative_graph = var.usage_carbon_emissions_query_query_definition_cost_analysis_ui_is_cumulative_graph
		}
		display_name = var.usage_carbon_emissions_query_query_definition_display_name
		report_query {
			#Required
			tenant_id = oci_metering_computation_tenant.test_tenant.id

			#Optional
			compartment_depth = var.usage_carbon_emissions_query_query_definition_report_query_compartment_depth
			date_range_name = var.usage_carbon_emissions_query_query_definition_report_query_date_range_name
			group_by = var.usage_carbon_emissions_query_query_definition_report_query_group_by
			group_by_tag {

				#Optional
				key = var.usage_carbon_emissions_query_query_definition_report_query_group_by_tag_key
				namespace = var.usage_carbon_emissions_query_query_definition_report_query_group_by_tag_namespace
				value = var.usage_carbon_emissions_query_query_definition_report_query_group_by_tag_value
			}
			is_aggregate_by_time = var.usage_carbon_emissions_query_query_definition_report_query_is_aggregate_by_time
			time_usage_ended = var.usage_carbon_emissions_query_query_definition_report_query_time_usage_ended
			time_usage_started = var.usage_carbon_emissions_query_query_definition_report_query_time_usage_started
			usage_carbon_emissions_query_filter = var.usage_carbon_emissions_query_query_definition_report_query_usage_carbon_emissions_query_filter
		}
		version = var.usage_carbon_emissions_query_query_definition_version
	}
}

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

Import

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

$ terraform import oci_metering_computation_usage_carbon_emissions_query.test_usage_carbon_emissions_query "id"