Skip to content

Commit

Permalink
Prevent creation ofusers and admins groups (#1091)
Browse files Browse the repository at this point in the history
Fix #1089
  • Loading branch information
nfx authored Feb 4, 2022
1 parent 89145fa commit bddadd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Version changelog

## 0.4.9

* Prevent creation of `databricks_group` with `users` and `admins` reserved names ([#1089](https://github.com/databrickslabs/terraform-provider-databricks/issues/1089)).

## 0.4.8

* Added support for `tf:suppress_diff` on primitive types ([#984](https://github.com/databrickslabs/terraform-provider-databricks/issues/984)).
Expand Down
6 changes: 5 additions & 1 deletion scim/resource_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ import (

"github.com/databrickslabs/terraform-provider-databricks/common"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

// ResourceGroup manages user groups
func ResourceGroup() *schema.Resource {
groupSchema := map[string]*schema.Schema{
"display_name": {
Type: schema.TypeString,
Type: schema.TypeString,
ValidateDiagFunc: validation.ToDiagFunc(
validation.StringNotInSlice(
[]string{"users", "admins"}, false)),
Required: true,
ForceNew: true,
},
Expand Down

0 comments on commit bddadd9

Please sign in to comment.