oci_distributed_database_distributed_autonomous_databases_remove

Executes REMOVE operations against an existing distributed autonomous database. Configure one to three remove blocks; all blocks are submitted together in one PATCH request. The provider generates the API operation fields automatically.

Example Usage

resource "oci_distributed_database_distributed_autonomous_databases_remove" "remove" {
  distributed_autonomous_database_id = oci_distributed_database_distributed_autonomous_database.example.id

  remove {
    selection = "systemRaftClusters[?name == 'raft-cluster-a'].databases[?name == 'database-a']"
  }
}

The example references an existing main database resource and input variables. Replace the topology and database names with names from your database.

Argument Reference

Each block generates only operation: REMOVE and selection. No value is sent.

Action Lifecycle

Creation executes the configured operations. An update executes them when the operation list changes, without an incremental trigger. Refresh reads the database state and does not execute operations. Unchanged action instances are not replayed when additional instances are added. Recreating an action instance, including after its state is removed, executes its configured operations again.

Resource labels are user-defined. For example, name two instances remove and remove_2; each submits its own operations. Keep successful instances unchanged and add another instance for additional operations. Changing an existing instance submits its full operation list again. Use depends_on to order instances targeting the same database when they must run sequentially.

Removing an operation block does not execute its inverse, but changing a nonempty list submits the remaining blocks again. At least one block is required. Removing the entire action resource only clears its Terraform state; it does not remove topology members or delete the target database. To remove members explicitly, use the corresponding REMOVE or REMOVEDG resource. Action changes do not replace or destroy the main database resource.

The provider polls the asynchronous work request and then refreshes the target until its top-level lifecycle state is ACTIVE or INACTIVE. Work requests ending in FAILED, CANCELED, or NEEDS_ATTENTION fail the action. Missing work-request IDs and API failures also produce diagnostics. Diagnostics identify the operation, database OCID, and available work-request OCID and service error details.

After adding shards, run distributed_autonomous_databases configure sharding after the INSERT resource completes successfully so the new shards participate in the sharding topology. Configure an explicit dependency on the action resource. Each additional INSERT resource needs a new configure-sharding action instance, or an explicit invocation through the main resource’s existing configure-sharding trigger.

Attributes Reference

Timeouts

The timeouts block accepts create, read, update, and delete, each defaulting to 12 hours. Destroy only clears action state.

Import

Import is not supported for this resource.

Related Resources