oci_logging_log

This resource provides the Log resource in Oracle Cloud Infrastructure Logging service.

Creates a log within the specified log group. This call fails if a log group has already been created with the same displayName or (service, resource, category) triplet.

Example Usage

resource "oci_logging_log" "test_log" {
	#Required
	display_name = var.log_display_name
	log_group_id = oci_logging_log_group.test_log_group.id
	log_type = var.log_log_type

	#Optional
	configuration {
		#Required
		source {
			#Required
			category = var.log_configuration_source_category
			resource = var.log_configuration_source_resource
			service = var.log_configuration_source_service
			source_type = var.log_configuration_source_source_type

			#Optional
			parameters = var.log_configuration_source_parameters
		}

		#Optional
		compartment_id = var.compartment_id
	}
	defined_tags = {"Operations.CostCenter"= "42"}
	freeform_tags = {"Department"= "Finance"}
	is_enabled = var.log_is_enabled
	retention_duration = var.log_retention_duration
}

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

Import

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

$ terraform import oci_logging_log.test_log "logGroupId/{logGroupId}/logId/{logId}"