Skip to content

Commit 09b3b50

Browse files
committed
suggested docs and code changes regarding node_type_id and instance_pool_id
1 parent 0c9410f commit 09b3b50

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

databricks/resource_databricks_cluster.go

+2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ func resourceCluster() *schema.Resource {
109109
Type: schema.TypeString,
110110
Optional: true,
111111
ConflictsWith: []string{"instance_pool_id"},
112+
AtLeastOneOf: []string{"instance_pool_id"},
112113
},
113114
"ssh_public_keys": &schema.Schema{
114115
Type: schema.TypeSet,
@@ -300,6 +301,7 @@ func resourceCluster() *schema.Resource {
300301
Type: schema.TypeString,
301302
Optional: true,
302303
ConflictsWith: []string{"node_type_id", "driver_node_type_id", "aws_attributes"},
304+
AtLeastOneOf: []string{"node_type_id"},
303305
},
304306
"idempotency_token": &schema.Schema{
305307
Type: schema.TypeInt,

website/content/Resources/cluster.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ value must be within the range 500 - 4096. Custom EBS volumes cannot be specifie
146146
is optional; if unset, the driver node type will be set as the same value as node_type_id defined above.
147147

148148
#### - `node_type_id`:
149-
> **(Required)** This field encodes, through a single value, the resources
149+
> **(Optional - required if instance_pool_id is not given)** This field encodes, through a single value, the resources
150150
available to each of the Spark nodes in this cluster. For example, the Spark nodes can be provisioned and optimized for
151151
memory or compute intensive workloads A list of available node types can be retrieved by using the List Node Types API
152152
call. This field is required.
@@ -324,7 +324,7 @@ this cluster dynamically acquires additional disk space when its Spark workers a
324324
feature requires specific AWS permissions to function correctly - refer to Autoscaling local storage for details.
325325
326326
#### - `instance_pool_id`:
327-
> **(Optional)** The optional ID of the instance pool to which the
327+
> **(Optional - required if node_type_id is not given)** The optional ID of the instance pool to which the
328328
cluster belongs. Refer to Instance Pools API for details.
329329
330330
#### - `single_user_name`:

0 commit comments

Comments
 (0)