oci_sch_service_connector

This resource provides the Service Connector resource in Oracle Cloud Infrastructure Service Connector Hub service.

Creates a new connector in the specified compartment. A connector is a logically defined flow for moving data from a source service to a destination service in Oracle Cloud Infrastructure. For more information, see Creating a Connector. For general information about connectors, see Overview of Connector Hub.

For purposes of access control, you must provide the OCID of the compartment where you want the connector to reside. Notice that the connector doesn't have to be in the same compartment as the source or target services. For information about access control and compartments, see Overview of the IAM Service.

After you send your request, the new connector's state is temporarily CREATING. When the state changes to ACTIVE, data begins transferring from the source service to the target service. For instructions on deactivating and activating connectors, see Activating a Connector.

Example Usage

resource "oci_sch_service_connector" "test_service_connector" {
    #Required
    compartment_id = var.compartment_id
    display_name = var.service_connector_display_name
    source {
        #Required
        kind = var.service_connector_source_kind

        #Optional
        config_map = var.service_connector_source_config_map
        cursor {

            #Optional
            kind = var.service_connector_source_cursor_kind
        }
        log_sources {

            #Optional
            compartment_id = var.compartment_id
            log_group_id = oci_logging_log_group.test_log_group.id
            log_id = oci_logging_log.test_log.id
        }
        monitoring_sources {

            #Optional
            compartment_id = var.compartment_id
            namespace_details {
                #Required
                kind = var.service_connector_source_monitoring_sources_namespace_details_kind
                namespaces {
                    #Required
                    metrics {
                        #Required
                        kind = var.service_connector_source_monitoring_sources_namespace_details_namespaces_metrics_kind
                    }
                    namespace = var.service_connector_source_monitoring_sources_namespace_details_namespaces_namespace
                }
            }
        }
        plugin_name = var.service_connector_source_plugin_name
        stream_id = oci_streaming_stream.test_stream.id
    }
    target {
        #Required
        kind = var.service_connector_target_kind

        #Optional
        batch_rollover_size_in_mbs = var.service_connector_target_batch_rollover_size_in_mbs
        batch_rollover_time_in_ms = var.service_connector_target_batch_rollover_time_in_ms
        batch_size_in_kbs = var.service_connector_target_batch_size_in_kbs
        batch_size_in_num = var.service_connector_target_batch_size_in_num
        batch_time_in_sec = var.service_connector_target_batch_time_in_sec
        bucket = var.service_connector_target_bucket
        compartment_id = var.compartment_id
        dimensions {

            #Optional
            dimension_value {
                #Required
                kind = var.service_connector_target_dimensions_dimension_value_kind

                #Optional
                path = var.service_connector_target_dimensions_dimension_value_path
                value = var.service_connector_target_dimensions_dimension_value_value
            }
            name = var.service_connector_target_dimensions_name
        }
        enable_formatted_messaging = var.service_connector_target_enable_formatted_messaging
        function_id = oci_functions_function.test_function.id
        log_group_id = oci_logging_log_group.test_log_group.id
        log_source_identifier = var.service_connector_target_log_source_identifier
        metric = var.service_connector_target_metric
        metric_namespace = var.service_connector_target_metric_namespace
        namespace = var.service_connector_target_namespace
        object_name_prefix = var.service_connector_target_object_name_prefix
        stream_id = oci_streaming_stream.test_stream.id
        topic_id = oci_ons_notification_topic.test_notification_topic.id
    }

    #Optional
    defined_tags = {"foo-namespace.bar-key"= "value"}
    description = var.service_connector_description
    freeform_tags = {"bar-key"= "value"}
    tasks {
        #Required
        kind = var.service_connector_tasks_kind

        #Optional
        batch_size_in_kbs = var.service_connector_tasks_batch_size_in_kbs
        batch_time_in_sec = var.service_connector_tasks_batch_time_in_sec
        condition = var.service_connector_tasks_condition
        function_id = oci_functions_function.test_function.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 Service Connector * update - (Defaults to 20 minutes), when updating the Service Connector * delete - (Defaults to 20 minutes), when destroying the Service Connector

Import

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

$ terraform import oci_sch_service_connector.test_service_connector "id"