Skip to content

Commit 8660c0f

Browse files
authored
Added description to max_clusters_per_user in databricks_cluster_policy (#1959)
1 parent 8e90991 commit 8660c0f

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ If you use Terraform 0.13 or newer, please refer to instructions specified at [r
9898
terraform {
9999
required_providers {
100100
databricks = {
101-
source = "databricks/databricks"
101+
source = "databricks/databricks"
102102
}
103103
}
104104
}

docs/data-sources/mws_credentials.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ The following resources are used in the same context:
4343
* [databricks_mws_log_delivery](mws_log_delivery.md) to configure delivery of [billable usage logs](https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html) and [audit logs](https://docs.databricks.com/administration-guide/account-settings/audit-logs.html).
4444
* [databricks_mws_networks](mws_networks.md) to [configure VPC](https://docs.databricks.com/administration-guide/cloud-configurations/aws/customer-managed-vpc.html) & subnets for new workspaces within AWS.
4545
* [databricks_mws_storage_configurations](mws_storage_configurations.md) to configure root bucket new workspaces within AWS.
46-
* [databricks_mws_workspaces](mws_workspaces.md) to set up [workspaces in E2 architecture on AWS](https://docs.databricks.com/getting-started/overview.html#e2-architecture-1).
46+
* [databricks_mws_workspaces](mws_workspaces.md) to set up [workspaces in E2 architecture on AWS](https://docs.databricks.com/getting-started/overview.html#e2-architecture-1).

docs/resources/cluster_policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ The following arguments are required:
9999

100100
* `name` - (Required) Cluster policy name. This must be unique. Length must be between 1 and 100 characters.
101101
* `definition` - (Required) Policy definition: JSON document expressed in [Databricks Policy Definition Language](https://docs.databricks.com/administration-guide/clusters/policies.html#cluster-policy-definition).
102-
* `max_clusters_per_user` - (Optional, integer) Maximum number of clusters allowed per user. When omitted, there is no limit.
102+
* `max_clusters_per_user` - (Optional, integer) Maximum number of clusters allowed per user. When omitted, there is no limit. If specified, value must be greater than zero.
103103

104104
## Attribute Reference
105105

docs/resources/sql_dashboard.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resource "databricks_directory" "shared_dir" {
1717
}
1818
1919
resource "databricks_sql_dashboard" "d1" {
20-
name = "My Dashboard Name"
20+
name = "My Dashboard Name"
2121
parent = "folders/${databricks_directory.shared_dir.object_id}"
2222
2323
tags = [

docs/resources/sql_query.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resource "databricks_sql_query" "q1" {
2626
AND event_date > date '{{ p3 }}'
2727
EOT
2828
29-
parent = "folders/${databricks_directory.shared_dir.object_id}"
29+
parent = "folders/${databricks_directory.shared_dir.object_id}"
3030
run_as_role = "viewer"
3131
3232
schedule {

policies/resource_cluster_policy.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type ClusterPolicy struct {
1818
MaxClustersPerUser int64 `json:"max_clusters_per_user,omitempty"`
1919
}
2020

21-
// ClusterPolicyCreate is the endity used for request
21+
// ClusterPolicyCreate is the entity used for request
2222
type ClusterPolicyCreate struct {
2323
Name string `json:"name"`
2424
Definition string `json:"definition"`
@@ -125,6 +125,9 @@ func ResourceClusterPolicy() *schema.Resource {
125125
"max_clusters_per_user": {
126126
Type: schema.TypeInt,
127127
Optional: true,
128+
Description: "Max number of clusters per user that can be active\n" +
129+
"using this policy. If not present, there is no max limit.",
130+
ValidateFunc: validation.IntAtLeast(1),
128131
},
129132
},
130133
Create: func(ctx context.Context, d *schema.ResourceData, c *common.DatabricksClient) error {

0 commit comments

Comments
 (0)