oci_data_safe_target_database

This resource provides the Target Database resource in Oracle Cloud Infrastructure Data Safe service.

Registers the specified database with Data Safe and creates a Data Safe target database in the Data Safe Console.

Example Usage

resource "oci_data_safe_target_database" "test_target_database" {
	#Required
	compartment_id = var.compartment_id
	database_details {
		#Required
		database_type = var.target_database_database_details_database_type
		infrastructure_type = var.target_database_database_details_infrastructure_type

		#Optional
		autonomous_database_id = oci_database_autonomous_database.test_autonomous_database.id
		db_system_id = oci_database_db_system.test_db_system.id
		instance_id = oci_core_instance.test_instance.id
		ip_addresses = var.target_database_database_details_ip_addresses
		listener_port = var.target_database_database_details_listener_port
		service_name = oci_core_service.test_service.name
		vm_cluster_id = oci_database_vm_cluster.test_vm_cluster.id
	}

	#Optional
	connection_option {
		#Required
		connection_type = var.target_database_connection_option_connection_type

		#Optional
		datasafe_private_endpoint_id = oci_dataflow_private_endpoint.test_private_endpoint.id
		on_prem_connector_id = oci_data_safe_on_prem_connector.test_on_prem_connector.id
	}
	credentials {
		#Required
		password = var.target_database_credentials_password
		user_name = oci_identity_user.test_user.name
	}
	defined_tags = {"Operations.CostCenter"= "42"}
	description = var.target_database_description
	display_name = var.target_database_display_name
	freeform_tags = {"Department"= "Finance"}
	peer_target_database_details {
		#Required
		database_details {
			#Required
			database_type = var.target_database_peer_target_database_details_database_details_database_type
			infrastructure_type = var.target_database_peer_target_database_details_database_details_infrastructure_type

			#Optional
			autonomous_database_id = oci_database_autonomous_database.test_autonomous_database.id
			db_system_id = oci_database_db_system.test_db_system.id
			instance_id = oci_core_instance.test_instance.id
			ip_addresses = var.target_database_peer_target_database_details_database_details_ip_addresses
			listener_port = var.target_database_peer_target_database_details_database_details_listener_port
			service_name = oci_core_service.test_service.name
			vm_cluster_id = oci_database_vm_cluster.test_vm_cluster.id
		}

		#Optional
		dataguard_association_id = oci_certificates_management_association.test_association.id
		description = var.target_database_peer_target_database_details_description
		display_name = var.target_database_peer_target_database_details_display_name
		tls_config {
			#Required
			status = var.target_database_peer_target_database_details_tls_config_status

			#Optional
			certificate_store_type = var.target_database_peer_target_database_details_tls_config_certificate_store_type
			key_store_content = var.target_database_peer_target_database_details_tls_config_key_store_content
			store_password = var.target_database_peer_target_database_details_tls_config_store_password
			trust_store_content = var.target_database_peer_target_database_details_tls_config_trust_store_content
		}
	}
	tls_config {
		#Required
		status = var.target_database_tls_config_status

		#Optional
		certificate_store_type = var.target_database_tls_config_certificate_store_type
		key_store_content = var.target_database_tls_config_key_store_content
		store_password = var.target_database_tls_config_store_password
		trust_store_content = var.target_database_tls_config_trust_store_content
	}
}

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

Import

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

$ terraform import oci_data_safe_target_database.test_target_database "id"