delphix-integrations / terraform-provider-delphix

Repository for Delphix Terraform Provider built on DCT APIs.
https://integrations.delphix.com
11 stars 9 forks source link

HUBS-1709 | cluster_node_ids wrong schema type #57

Closed Uddipaan-Hazarika closed 1 year ago

Uddipaan-Hazarika commented 1 year ago

Context:

The parameter for cluster_node_ids was configured with a wrong schema type. More Info: https://delphix.atlassian.net/browse/HUBS-1709

Problem:

cluster_node_ids parameter defined as a string whereas DCT takes it as a list of string.

Solution:

Conform the type of the param to conform to DCT request type(list of string) "cluster_node_ids": [ "ORACLE_CLUSTER_NODE-1" ],

Testing:

Payload:

resource "delphix_vdb" "vdb_name" {
  provision_type         = "snapshot"
  auto_select_repository = true
  source_data_id         = "9-ORACLE_DB_CONTAINER-51" //4-ORACLE_DB_CONTAINER-27

  cluster_node_ids = ["ORACLE_CLUSTER_NODE-3"]
}

Result:(Log Level = TRACE)

REQUEST: {"auto_select_repository":true,"cluster_node_ids":["ORACLE_CLUSTER_NODE-3"],"make_current_account_owner":true,"source_data_id":"9-ORACLE_DB_CONTAINER-51"}
RESPONSE: {"job":{"id":"d24b87a062924001ba8ffc7c106d4dc6","status":"STARTED","type":"VDB_PROVISION","target_id":"9-ORACLE_DB_CONTAINER-87","start_time":"2023-05-18T16:46:03.466348Z"},"vdb_id":"9-ORACLE_DB_CONTAINER-87"}

PS: for some oracle rac mumbo jumbo, the provision failed but it atleast started the provision process in the UI.

Error: [NOT OK] Job d24b87a062924001ba8ffc7c106d4dc6 FAILED with error Failed to mount database instance. See command output for more information.