databricks / terraform-provider-databricks

Databricks Terraform Provider
https://registry.terraform.io/providers/databricks/databricks/latest
Other
427 stars 367 forks source link

[ISSUE] Group entitlement allowing allow_sql_analytics_access is not applying #548

Closed frosforever closed 3 years ago

frosforever commented 3 years ago

Thanks very much in advance for your time helping debug this!

Terraform Version

terraform -v
Terraform v0.13.5
+ provider registry.terraform.io/databrickslabs/databricks v0.3.1
+ provider registry.terraform.io/hashicorp/aws v3.28.0

Affected Resource(s)

Please list the resources as a list, for example:

Terraform Configuration Files

resource "databricks_group" "ds_dataengineering" {
  display_name               = "Data Engineering"
  allow_cluster_create       = true
  allow_instance_pool_create = true
  allow_sql_analytics_access = true
}

Debug Output

Version 0.3.1

https://registry.terraform.io/providers/databrickslabs/databricks/latest/docs

configuring server automatic mTLS: timestamp=2021-03-04T14:41:58.554Z
address=/tmp/plugin448578797 network=unix timestamp=2021-03-04T14:41:58.627Z
Explicit and implicit attributes: host, token: timestamp=2021-03-04T14:41:58.721Z
Explicit and implicit attributes: host, password, username: timestamp=2021-03-04T14:41:58.722Z
path=.terraform/plugins/registry.terraform.io/databrickslabs/databricks/0.3.1/linux_amd64/terraform-provider-databricks_v0.3.1 pid=165
databricks_group.ds_dataengineering: Modifying... [id=<REDACTED>]
2021/03/04 14:41:58 [DEBUG] databricks_group.ds_dataengineering: applying the planned Update change
Using directly configured host+token authentication: timestamp=2021-03-04T14:41:58.739Z
PATCH /preview/scim/v2/Groups/<REDACTED> {
  "Operations": [
    {
      "op": "add",
      "path": "entitlements",
      "value": [
        {
          "value": "sql-analytics-access"
        }
      ]
    },
    {
      "op": "remove",
      "path": "entitlements[value eq \"sql-analytics-access\"]"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ]
}: timestamp=2021-03-04T14:41:58.740Z
2021-03-04T14:42:01.073Z [DEBUG] plugin.terraform-provider-databricks_v0.3.1: 200 OK {
"displayName": "Data Engineering",
  "entitlements": [
    {
      "value": "allow-cluster-create"
    },
    {
      "value": "allow-instance-pool-create"
    }
  ],
  "groups": [],
  "id": "<REDACTED>",
  "members": <REDACTED>
      "$ref": "Users/<REDACTED>... (164 more bytes) <- PATCH /preview/scim/v2/Groups/<REDACTED>: timestamp=2021-03-04T14:42:01.073Z
databricks_group.ds_dataengineering: Modifications complete after 2s [id=<REDACTED>]
2021-03-04T14:42:01.076Z [WARN]  plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-03-04T14:42:01.078Z [DEBUG] plugin: plugin process exited: path=.terraform/plugins/registry.terraform.io/databrickslabs/databricks/0.3.1/linux_amd64/terraform-provider-databricks_v0.3.1 pid=147
2021-03-04T14:42:01.079Z [DEBUG] plugin: plugin exited

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.     

Panic Output

N/A

Expected Behavior

Entitlement for sql analytics applied to the group and reflected in user permissions and in the admin console

Actual Behavior

Nothing. Apply returns with success though no change is actually made. Running plan again has the change as not applied yet.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply
stikkireddy commented 3 years ago

@frosforever made a PR for this. When the maintainers review it and decide to go forward with it. It should be resolved in the next release of the provider.

frosforever commented 3 years ago

thanks @stikkireddy!