oci_opsi_database_insight

This resource provides the Database Insight resource in Oracle Cloud Infrastructure Opsi service.

Create a Database Insight resource for a Enterprise Manager(EM) managed database in Operations Insights. The database will be enabled in Operations Insights. Database metric collection and analysis will be started. The Database Insight resource for Autonomous Database and Management Agent managed external Database needs to be created by Database service terraform provider.

Example Usage

resource "oci_opsi_database_insight" "test_database_insight" {
	#Required
	compartment_id = var.compartment_id
	database_id = oci_database_database.test_database.id
	database_resource_type = var.database_insight_database_resource_type
	entity_source = var.database_insight_entity_source

	#Optional
	connection_details {
		#Required
		protocol = var.database_insight_connection_details_protocol
		service_name = oci_core_service.test_service.name

		#Optional
		host_name = var.database_insight_connection_details_host_name
		hosts {

			#Optional
			host_ip = var.database_insight_connection_details_hosts_host_ip
			port = var.database_insight_connection_details_hosts_port
		}
		port = var.database_insight_connection_details_port
	}
	entity_source = var.database_insight_entity_source

	#Optional
	connection_credential_details {
		#Required
		credential_source_name = var.database_insight_connection_credential_details_credential_source_name
		credential_type = var.database_insight_connection_credential_details_credential_type

		#Optional
		password_secret_id = oci_vault_secret.test_secret.id
		role = var.database_insight_connection_credential_details_role
		user_name = oci_identity_user.test_user.name
		wallet_secret_id = oci_vault_secret.test_secret.id
	}
	credential_details {
		#Required
		credential_source_name = var.database_insight_credential_details_credential_source_name
		credential_type = var.database_insight_credential_details_credential_type

		#Optional
		password_secret_id = oci_vault_secret.test_secret.id
		role = var.database_insight_credential_details_role
		user_name = oci_identity_user.test_user.name
		wallet_secret_id = oci_vault_secret.test_secret.id
	}
	dbm_private_endpoint_id = oci_dataflow_private_endpoint.test_private_endpoint.id
	defined_tags = {"foo-namespace.bar-key"= "value"}
	deployment_type = var.database_insight_deployment_type
	enterprise_manager_bridge_id = oci_opsi_enterprise_manager_bridge.test_enterprise_manager_bridge.id
	enterprise_manager_entity_identifier = var.database_insight_enterprise_manager_entity_identifier
	enterprise_manager_identifier = var.database_insight_enterprise_manager_identifier
	exadata_insight_id = oci_opsi_exadata_insight.test_exadata_insight.id
	freeform_tags = {"bar-key"= "value"}
	management_agent_id = oci_management_agent_management_agent.test_management_agent.id
	opsi_private_endpoint_id = oci_dataflow_private_endpoint.test_private_endpoint.id
	service_name = oci_core_service.test_service.name
	system_tags = var.database_insight_system_tags
}

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. The resource destruction here is basically a soft delete. User cannot create resource using the same EM managed bridge OCID. If resource is in enabled state during destruction, the resource will be disabled automatically before performing delete operation.

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

Import

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

$ terraform import oci_opsi_database_insight.test_database_insight "id"