oci_globally_distributed_database_sharded_database

This resource provides the Sharded Database resource in Oracle Cloud Infrastructure Globally Distributed Database service.

Creates a Sharded Database.

Patch operation to add, remove or update shards to the sharded database topology. In single patch operation, multiple shards can be either added, or removed or updated. Combination of inserts, update and remove in single operation is not allowed.

Example Usage

resource "oci_globally_distributed_database_sharded_database" "test_sharded_database" {
	#Required
	catalog_details {
		#Required
		admin_password = var.sharded_database_catalog_details_admin_password
		cloud_autonomous_vm_cluster_id = oci_database_cloud_autonomous_vm_cluster.test_cloud_autonomous_vm_cluster.id
		compute_count = var.sharded_database_catalog_details_compute_count
		data_storage_size_in_gbs = var.sharded_database_catalog_details_data_storage_size_in_gbs
		is_auto_scaling_enabled = var.sharded_database_catalog_details_is_auto_scaling_enabled

		#Optional
		encryption_key_details {
			#Required
			kms_key_id = oci_kms_key.test_key.id
			vault_id = oci_kms_vault.test_vault.id

			#Optional
			kms_key_version_id = oci_kms_key_version.test_key_version.id
		}
		peer_cloud_autonomous_vm_cluster_id = oci_database_cloud_autonomous_vm_cluster.test_cloud_autonomous_vm_cluster.id
	}
	character_set = var.sharded_database_character_set
	compartment_id = var.compartment_id
	db_deployment_type = var.sharded_database_db_deployment_type
	db_version = var.sharded_database_db_version
	db_workload = var.sharded_database_db_workload
	display_name = var.sharded_database_display_name
	listener_port = var.sharded_database_listener_port
	listener_port_tls = var.sharded_database_listener_port_tls
	ncharacter_set = var.sharded_database_ncharacter_set
	ons_port_local = var.sharded_database_ons_port_local
	ons_port_remote = var.sharded_database_ons_port_remote
	prefix = var.sharded_database_prefix
	shard_details {
		#Required
		admin_password = var.sharded_database_shard_details_admin_password
		cloud_autonomous_vm_cluster_id = oci_database_cloud_autonomous_vm_cluster.test_cloud_autonomous_vm_cluster.id
		compute_count = var.sharded_database_shard_details_compute_count
		data_storage_size_in_gbs = var.sharded_database_shard_details_data_storage_size_in_gbs
		is_auto_scaling_enabled = var.sharded_database_shard_details_is_auto_scaling_enabled

		#Optional
		encryption_key_details {
			#Required
			kms_key_id = oci_kms_key.test_key.id
			vault_id = oci_kms_vault.test_vault.id

			#Optional
			kms_key_version_id = oci_kms_key_version.test_key_version.id
		}
		peer_cloud_autonomous_vm_cluster_id = oci_database_cloud_autonomous_vm_cluster.test_cloud_autonomous_vm_cluster.id
		shard_space = var.sharded_database_shard_details_shard_space
	}
	sharded_database_id = var.sharded_database_sharded_database_id
	sharding_method = var.sharded_database_sharding_method

	#Optional
	chunks = var.sharded_database_chunks
	cluster_certificate_common_name = var.sharded_database_cluster_certificate_common_name
	defined_tags = {"foo-namespace.bar-key"= "value"}
	freeform_tags = {"bar-key"= "value"}
	patch_operations {
		#Required
		operation = var.sharded_database_patch_operations_operation
		selection = var.sharded_database_patch_operations_selection

		#Optional
		value = var.sharded_database_patch_operations_value
	}
	replication_factor = var.sharded_database_replication_factor
	replication_method = var.sharded_database_replication_method
	replication_unit = var.sharded_database_replication_unit
}

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

Import

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

$ terraform import oci_globally_distributed_database_sharded_database.test_sharded_database "id"