Open cesarnascimentto opened 9 months ago
Most probably you have problem with the TF code itself. You didn't post the full code, for example, I don't see local.all_members_merged
definition...
Hello @alexott ! I included the local.tf file as you mentioned. But, could it be this? Considering that apply and plan work? It seems to me an error from the Databricks API in constructing the request for destroy.
I performed a test by removing all lists and creating the group, associating the user directly. The plan and apply ran smoothly. However, the same error occurred during the destroy operation:
Error: cannot delete group member: Unrecognized field "value" (class com.unboundid.scim2.common.messages.PatchOperation$RemoveOperation), not marked as ignorable (one known property: "path"]) │ at [Source: (String)"{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"remove","path":"members[value eq \"4804081037358757\"]","value":""}]}"; line: 1, column: 148] (through reference chain: com.unboundid.scim2.common.messages.PatchRequest["Operations"]->java.util.ArrayList[0]->com.unboundid.scim2.common.messages.PatchOperation$RemoveOperation["value"])
provider "databricks" {
host = var.host
account_id = var.account_id
}
resource "databricks_group" "unit_catalog_group" {
display_name = "Group_test_1"
}
data "databricks_user" "unit_catalog_group_user" {
user_name = "user1-ext@xx-xxxxx.com"
depends_on = [
databricks_group.unit_catalog_group
]
}
resource "databricks_group_member" "member_group" {
group_id = databricks_group.unit_catalog_group.id
member_id = data.databricks_user.unit_catalog_group_user.id
depends_on = [
databricks_group.unit_catalog_group,
data.databricks_user.unit_catalog_group_user,
]
}
Hello Databricks team, any updates regarding this situation?
Hello! Any update on this error?
## Configuration
Populating the variables in terraform.auto.tfvars
### Expected Behavior All resources are being destroyed.
### Actual Behavior We were previously using this approach with version 1.14.0 of the Databricks provider. However, we started receiving errors with the plan and apply commands. We updated the provider to the current version (1.37.1), and the apply and plan commands were restored. However, when running the terraform destroy command, we encountered other errors.
## Log Errors Error: cannot delete group member: Unrecognized field "value" (class com.unboundid.scim2.common.messages.PatchOperation$RemoveOperation), not marked as ignorable (one known property: "path"]) │ at [Source: (String)"{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"remove","path":"members[value eq \"0X0X0X10XX000X00\"]","value":""}]}"; line: 1, column: 148] (through reference chain: com.unboundid.scim2.common.messages.PatchRequest["Operations"]->java.util.ArrayList[0]->com.unboundid.scim2.common.messages.PatchOperation$RemoveOperation["value"])
PS: The IDs have been masked for client security.
### Steps to Reproduce terraform destroy
### Terraform and provider versions azurerm = 3.93.0 databricks = 1.37.1 terraform = 1.3.0
### Is it a regression? Resource deletion
### Debug Output < "schemas": [ < "urn:ietf:params:scim:api:messages:2.0:Error" < ], < "status": "400" < }: tf_rpc=ApplyResourceChange tf_provider_addr=registry.terraform.io/databricks/databricks tf_req_id=000000-00000000-00000000-000 @caller=/home/runner/work/terraform-provider-databricks/terraform-provider-databricks/logger/logger.go:33 @module=databricks tf_resource_type=databricks_group_member timestamp=2024-02-23T17:57:41.405-0300 2024-02-23T17:57:41.407-0300 [ERROR] provider.terraform-provider-databricks_v1.37.1: Response contains error diagnostic: @module=sdk.proto diagnostic_detail="" tf_provider_addr=registry.terraform.io/databricks/databricks @caller=/home/runner/work/terraform-provider-databricks/terraform-provider-databricks/vendor/github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/diag/diagnostics.go:62 tf_req_id=000001000-00000000-0000 diagnostic_summary= | cannot delete group member: Unrecognized field "value" (class com.unboundid.scim2.common.messages.PatchOperation$RemoveOperation), not marked as ignorable (one known property: "path"]) | at [Source: (String)"{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"remove","path":"members[value eq \"123456789101112\"]","value":""}]}"; line: 1, column: 148] (through reference chain: com.unboundid.scim2.common.messages.PatchRequest["Operations"]->java.util.ArrayList[0]->com.unboundid.scim2.common.messages.PatchOperation$RemoveOperation["value"]) tf_resource_type=databricks_group_member tf_rpc=ApplyResourceChange diagnostic_severity=ERROR tf_proto_version=5.4 timestamp=2024-02-23T17:57:41.405-0300 2024-02-23T17:57:41.407-0300 [DEBUG] provider.terraform-provider-databricks_v1.37.1: non-retriable error: Unrecognized field "value" (class com.unboundid.scim2.common.messages.PatchOperation$RemoveOperation), not marked as ignorable (one known property: "path"]) at [Source: (String)"{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"remove","path":"members[value eq \"3702515137500277\"]","value":""}]}"; line: 1, column: 148] (through reference chain: com.unboundid.scim2.common.messages.PatchRequest["Operations"]->java.util.ArrayList[0]->com.unboundid.scim2.common.messages.PatchOperation$RemoveOperation["value"]): tf_req_id=X0000000-X0X0-0xx0-xX0x-0x00X0xxx0x0 tf_resource_type=databricks_group_member @caller=/home/runner/work/terraform-provider-databricks/terraform-provider-databricks/logger/logger.go:33 tf_provider_addr=registry.terraform.io/databricks/databricks tf_rpc=ApplyResourceChange @module=databricks timestamp=2024-02-23T17:57:41.405-0300 2024-02-23T17:57:41.407-0300 [DEBUG] provider.terraform-provider-databricks_v1.37.1: PATCH /api/2.0/accounts/1x11xx1x-01x1-0xx0-xx00-0x0000x0x00x/scim/v2/Groups/1211109876543210
### Important Factoids Before updating the Databricks provider, the 'terraform plan', 'apply', and 'destroy' commands were not working. After updating to the current provider version, 'terraform destroy' presents the mentioned issue.