oci_data_safe_subsetting_policy

This resource provides the Subsetting Policy resource in Oracle Cloud Infrastructure Data Safe service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/data-safe/latest/SubsettingPolicy

Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/datasafe

Creates a new subsetting policy and associates it with a sensitive data model or a target database.

To use a sensitive data model as the source of subsetting schemas, set the schemaSource attribute to SENSITIVE_DATA_MODEL and provide the sensitiveDataModelId attribute. In this case, the target database associated with the sensitive data model is used for subsetting rules validations.

You can also create a subsetting policy without using a sensitive data model. In this case, you need to associate your subsetting policy with a target database by setting the schemaSource attribute to TARGET and providing the targetId attribute. The specified target database is used for subsetting rules validations.

After creating a subsetting policy, you can use the CreateSubsettingRule operation to manually add subsetting rules to the policy.

Example Usage

resource "oci_data_safe_subsetting_policy" "test_subsetting_policy" {
	#Required
	compartment_id = var.compartment_id
	schema_source {
		#Required
		schema_source = var.subsetting_policy_schema_source_schema_source

		#Optional
		schemas_for_subsetting = var.subsetting_policy_schema_source_schemas_for_subsetting
		sensitive_data_model_id = oci_data_safe_sensitive_data_model.test_sensitive_data_model.id
		target_id = oci_cloud_guard_target.test_target.id
	}

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	description = var.subsetting_policy_description
	display_name = var.subsetting_policy_display_name
	freeform_tags = {"Department"= "Finance"}
	is_redo_logging_enabled = var.subsetting_policy_is_redo_logging_enabled
	is_refresh_stats_enabled = var.subsetting_policy_is_refresh_stats_enabled
	masking_policy_id = oci_data_safe_masking_policy.test_masking_policy.id
	parallel_degree = var.subsetting_policy_parallel_degree
	post_subsetting_script = var.subsetting_policy_post_subsetting_script
	pre_subsetting_script = var.subsetting_policy_pre_subsetting_script
	recompile = var.subsetting_policy_recompile
	unrelated_tables_action = var.subsetting_policy_unrelated_tables_action
}

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

Import

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

$ terraform import oci_data_safe_subsetting_policy.test_subsetting_policy "id"