oci_log_analytics_log_analytics_object_collection_rule

This resource provides the Log Analytics Object Collection Rule resource in Oracle Cloud Infrastructure Log Analytics service.

Create a configuration to collect logs from object storage bucket.

Example Usage

resource "oci_log_analytics_log_analytics_object_collection_rule" "test_log_analytics_object_collection_rule" {
    #Required
    compartment_id = var.compartment_id
    log_group_id = oci_logging_log_group.test_log_group.id
    log_source_name = var.log_analytics_object_collection_rule_log_source_name
    name = var.log_analytics_object_collection_rule_name
    namespace = var.log_analytics_object_collection_rule_namespace
    os_bucket_name = oci_objectstorage_bucket.test_bucket.name
    os_namespace = var.log_analytics_object_collection_rule_os_namespace

    #Optional
    char_encoding = var.log_analytics_object_collection_rule_char_encoding
    collection_type = var.log_analytics_object_collection_rule_collection_type
    defined_tags = {"foo-namespace.bar-key"= "value"}
    description = var.log_analytics_object_collection_rule_description
    entity_id = oci_log_analytics_entity.test_entity.id
    freeform_tags = {"bar-key"= "value"}
    is_enabled = var.log_analytics_object_collection_rule_is_enabled
    is_force_historic_collection = var.log_analytics_object_collection_rule_is_force_historic_collection
    log_set = var.log_analytics_object_collection_rule_log_set
    log_set_ext_regex = var.log_analytics_object_collection_rule_log_set_ext_regex
    log_set_key = var.log_analytics_object_collection_rule_log_set_key
    log_type = var.log_analytics_object_collection_rule_log_type
    object_name_filters = var.log_analytics_object_collection_rule_object_name_filters
    overrides = var.log_analytics_object_collection_rule_overrides
    poll_since = var.log_analytics_object_collection_rule_poll_since
    poll_till = var.log_analytics_object_collection_rule_poll_till
    timezone = var.log_analytics_object_collection_rule_timezone
}

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

Import

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

$ terraform import oci_log_analytics_log_analytics_object_collection_rule.test_log_analytics_object_collection_rule "namespaces/{namespaceName}/logAnalyticsObjectCollectionRules/{logAnalyticsObjectCollectionRuleId}"