databricks/terraform-provider-databricks

[ISSUE] Issue with `databricks_user` resource when email contains quote character

Opened this issue · 0 comments

When user_name (email) contains quote character terraform provider is no longer able to correctly handle force = true scenario and tries to create user again.

Configuration

resource "databricks_user" "this" {
  user_name    = "grzegorz.rusin'@someplace.com"
  display_name = "Grzegorz Rusin'"
  active       = true
  force        = true
}

Expected Behavior

expected behaviour would be to update the user if exists, or create a new one

Actual Behavior

the quote character in the user_name (email) makes tf think that user does not exist yet, and tries to created it, and then you end up with "user exists error", just if force = true was not handled

Steps to Reproduce

Terraform and provider versions

tested on latest 1.24.1