Skip to content

Commit 90490c5

Browse files
committed
Revert "feat: iam refactor"
This reverts commit a279976.
1 parent a279976 commit 90490c5

File tree

2 files changed

+13
-24
lines changed

2 files changed

+13
-24
lines changed

variables.tf

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,21 @@ variable "user_object_ids" {
1414
default = {}
1515
}
1616

17-
variable "workspace_admins" {
18-
type = object({
19-
user = list(string)
20-
service_principal = list(string)
21-
})
22-
description = "Provide users or service principals to grant them Admin permissions."
23-
default = {
24-
user = null
25-
service_principal = null
26-
}
27-
}
28-
2917
variable "iam" {
3018
type = map(object({
31-
user = optional(list(string))
32-
service_principal = optional(list(string))
33-
entitlements = optional(list(string))
19+
user = list(string)
20+
service_principal = list(string)
3421
}))
35-
description = "Map of group name and its parameters, such as users and service principals whom are added to the group. Also group entitlements."
36-
default = {}
37-
38-
validation {
39-
condition = contains(values(var.iam), "entitlements") ? alltrue([
40-
for item in toset(flatten([for group, params in var.iam : params.entitlements])) : contains(["allow_cluster_create", "allow_instance_pool_create", "databricks_sql_access"], item)
41-
]) : true
42-
error_message = "Entitlements validation. The only suitable values are: databricks_sql_access, allow_instance_pool_create, allow_cluster_create"
22+
description = "Map of groups and members of users and service principals to be created. You can add you own groups and members. E.g., `'group' = { user = ['user1','user2'] service_principal = ['sp1']}` and etc."
23+
default = {
24+
"admins" = {
25+
"user" = []
26+
"service_principal" = []
27+
}
28+
"default" = {
29+
"user" = []
30+
"service_principal" = []
31+
}
4332
}
4433
}
4534

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
databricks = {
66
source = "databricks/databricks"
7-
version = ">=1.9.0"
7+
version = ">=1.4.0"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)