Skip to content

Commit e242ec8

Browse files
committed
Ingorning diff customization for permissions resource, so that new workspace deployments won't fail without explicit dependency on a workspace resource
1 parent a1b09c6 commit e242ec8

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* Default `terraform-mount` clusters created for mounting for `databricks_aws_s3_mount`, `databricks_azure_adls_gen1_mount`, `databricks_azure_adls_gen2_mount`, and `databricks_azure_blob_mount` have now `spark.scheduler.mode` as `FIFO` ([#828](https://github.com/databrickslabs/terraform-provider-databricks/pull/828))
1010
* Fixed crash when using non-Azure authentication to mount Azure resources ([#831](https://github.com/databrickslabs/terraform-provider-databricks/issues/831))
1111
* Fixed replacement of `instance_pool_id` in `databricks_cluster`, when `driver_instance_pool_id` was not explicitly specified ([#824](https://github.com/databrickslabs/terraform-provider-databricks/issues/824))
12+
* Ingorning diff customization for permissions resource, so that new workspace deployments won't fail without explicit dependency on a workspace resource
1213
* Multiple documentation improvements
1314

1415
**Deprecations**

access/resource_permissions.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,13 @@ func ResourcePermissions() *schema.Resource {
368368
}
369369
return &schema.Resource{
370370
Schema: s,
371-
CustomizeDiff: func(ctx context.Context, diff *schema.ResourceDiff, m interface{}) error {
372-
me, err := identity.NewUsersAPI(ctx, m).Me()
371+
CustomizeDiff: func(ctx context.Context, diff *schema.ResourceDiff, c interface{}) error {
372+
client := c.(*common.DatabricksClient)
373+
if client.Host == "" {
374+
log.Printf("[WARN] cannot validate permission levels, because host is not known yet")
375+
return nil
376+
}
377+
me, err := identity.NewUsersAPI(ctx, client).Me()
373378
if err != nil {
374379
return err
375380
}

0 commit comments

Comments
 (0)