oci_database_migration_migration

This resource provides the Migration resource in Oracle Cloud Infrastructure Database Migration service.

Create a Migration resource that contains all the details to perform the database migration operation, such as source and destination database details, credentials, etc.

Note: If you wish to use the DMS deprecated API version /20210929 it is necessary to pin the Terraform Provider version to v5.47.0. Newer Terraform provider versions will not support the DMS deprecated API version /20210929

Example Usage

resource "oci_database_migration_migration" "test_migration" {
	#Required
	compartment_id = var.compartment_id
	database_combination = var.migration_database_combination
	source_database_connection_id = oci_database_migration_connection.test_connection.id
	target_database_connection_id = oci_database_migration_connection.test_connection.id
	type = var.migration_type

	#Optional
	advanced_parameters {

		#Optional
		data_type = var.migration_advanced_parameters_data_type
		name = var.migration_advanced_parameters_name
		value = var.migration_advanced_parameters_value
	}
	advisor_settings {

		#Optional
		is_ignore_errors = var.migration_advisor_settings_is_ignore_errors
		is_skip_advisor = var.migration_advisor_settings_is_skip_advisor
	}
	bulk_include_exclude_data = var.migration_bulk_include_exclude_data
	data_transfer_medium_details {
		#Required
		type = var.migration_data_transfer_medium_details_type

		#Optional
		access_key_id = oci_kms_key.test_key.id
		name = var.migration_data_transfer_medium_details_name
		object_storage_bucket {

			#Optional
			bucket = var.migration_data_transfer_medium_details_object_storage_bucket_bucket
			namespace = var.migration_data_transfer_medium_details_object_storage_bucket_namespace
		}
		region = var.migration_data_transfer_medium_details_region
		secret_access_key = var.migration_data_transfer_medium_details_secret_access_key
		shared_storage_mount_target_id = oci_file_storage_mount_target.test_mount_target.id
		source {
			#Required
			kind = var.migration_data_transfer_medium_details_source_kind

			#Optional
			oci_home = var.migration_data_transfer_medium_details_source_oci_home
			wallet_location = var.migration_data_transfer_medium_details_source_wallet_location
		}
		target {
			#Required
			kind = var.migration_data_transfer_medium_details_target_kind

			#Optional
			oci_home = var.migration_data_transfer_medium_details_target_oci_home
			wallet_location = var.migration_data_transfer_medium_details_target_wallet_location
		}
	}
	defined_tags = {"foo-namespace.bar-key"= "value"}
	description = var.migration_description
	display_name = var.migration_display_name
	exclude_objects {
		#Required
		object = var.migration_exclude_objects_object

		#Optional
		is_omit_excluded_table_from_replication = var.migration_exclude_objects_is_omit_excluded_table_from_replication
		owner = var.migration_exclude_objects_owner
		schema = var.migration_exclude_objects_schema
		type = var.migration_exclude_objects_type
	}
	freeform_tags = var.migration_freeform_tags
	ggs_details {

		#Optional
		acceptable_lag = var.migration_ggs_details_acceptable_lag
		extract {

			#Optional
			long_trans_duration = var.migration_ggs_details_extract_long_trans_duration
			performance_profile = var.migration_ggs_details_extract_performance_profile
		}
		replicat {

			#Optional
			performance_profile = var.migration_ggs_details_replicat_performance_profile
		}
	}
	hub_details {
		#Required
		key_id = oci_kms_key.test_key.id
		rest_admin_credentials {
			#Required
			password = var.migration_hub_details_rest_admin_credentials_password
			username = var.migration_hub_details_rest_admin_credentials_username
		}
		url = var.migration_hub_details_url
		vault_id = oci_kms_vault.test_vault.id

		#Optional
		acceptable_lag = var.migration_hub_details_acceptable_lag
		compute_id = oci_database_migration_compute.test_compute.id
		extract {

			#Optional
			long_trans_duration = var.migration_hub_details_extract_long_trans_duration
			performance_profile = var.migration_hub_details_extract_performance_profile
		}
		replicat {

			#Optional
			performance_profile = var.migration_hub_details_replicat_performance_profile
		}
	}
	include_objects {
		#Required
		object = var.migration_include_objects_object

		#Optional
		is_omit_excluded_table_from_replication = var.migration_include_objects_is_omit_excluded_table_from_replication
		owner = var.migration_include_objects_owner
		schema = var.migration_include_objects_schema
		type = var.migration_include_objects_type
	}
	initial_load_settings {
		#Required
		job_mode = var.migration_initial_load_settings_job_mode

		#Optional
		compatibility = var.migration_initial_load_settings_compatibility
		data_pump_parameters {

			#Optional
			estimate = var.migration_initial_load_settings_data_pump_parameters_estimate
			exclude_parameters = var.migration_initial_load_settings_data_pump_parameters_exclude_parameters
			export_parallelism_degree = var.migration_initial_load_settings_data_pump_parameters_export_parallelism_degree
			import_parallelism_degree = var.migration_initial_load_settings_data_pump_parameters_import_parallelism_degree
			is_cluster = var.migration_initial_load_settings_data_pump_parameters_is_cluster
			table_exists_action = var.migration_initial_load_settings_data_pump_parameters_table_exists_action
		}
		export_directory_object {

			#Optional
			name = var.migration_initial_load_settings_export_directory_object_name
			path = var.migration_initial_load_settings_export_directory_object_path
		}
		handle_grant_errors = var.migration_initial_load_settings_handle_grant_errors
		import_directory_object {

			#Optional
			name = var.migration_initial_load_settings_import_directory_object_name
			path = var.migration_initial_load_settings_import_directory_object_path
		}
		is_consistent = var.migration_initial_load_settings_is_consistent
		is_ignore_existing_objects = var.migration_initial_load_settings_is_ignore_existing_objects
		is_tz_utc = var.migration_initial_load_settings_is_tz_utc
		metadata_remaps {

			#Optional
			new_value = var.migration_initial_load_settings_metadata_remaps_new_value
			old_value = var.migration_initial_load_settings_metadata_remaps_old_value
			type = var.migration_initial_load_settings_metadata_remaps_type
		}
		primary_key_compatibility = var.migration_initial_load_settings_primary_key_compatibility
		tablespace_details {
			#Required
			target_type = var.migration_initial_load_settings_tablespace_details_target_type

			#Optional
			block_size_in_kbs = var.migration_initial_load_settings_tablespace_details_block_size_in_kbs
			extend_size_in_mbs = var.migration_initial_load_settings_tablespace_details_extend_size_in_mbs
			is_auto_create = var.migration_initial_load_settings_tablespace_details_is_auto_create
			is_big_file = var.migration_initial_load_settings_tablespace_details_is_big_file
			remap_target = var.migration_initial_load_settings_tablespace_details_remap_target
		}
	}
	source_container_database_connection_id = oci_database_migration_connection.test_connection.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 Migration * update - (Defaults to 20 minutes), when updating the Migration * delete - (Defaults to 20 minutes), when destroying the Migration

Import

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

$ terraform import oci_database_migration_migration.test_migration "id"