Skip to content

[ISSUE] Issue with databricks_connection resource (Salesforce connction) #4616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
shlomitubul opened this issue Apr 6, 2025 · 0 comments

Comments

@shlomitubul
Copy link

Configuration

resource "databricks_connection" "salesforce-cloud" {

  name            = "salesforce"
  connection_type =  "SALESFORCE"
  comment         = "Salesforce cloud connection"
   options = {
    is_sandbox    = "false"
    client_id     = "some-client-id"
    client_secret = "some-client-secret"
    client_scope  = "full"
  }
}

Expected Behavior

The connection should be created without errors

Actual Behavior

cannot create connection: CONNECTION/CONNECTION_SALESFORCE must include the following option(s): refresh_token.

I'm not sure that requiring refresh token when creating a connection object via terraform/API makes sense, as far as I understand the dbx side can create this token since I also grant "refresh_token" scope in the salesforce connected app.
as note the same error is thrown when I try to use databricks-cli,
also, it works fine when creating it via UI .

is that possible that databricks API only implements Authorization Code flow and this is why it require this param? if so, maybe it possible to support JWT flow ? (didn't dig enough to see if that 100% match the use case + not familiar with SF much, so pardon if that's not relevant)

Steps to Reproduce

  1. terraform apply-->

Terraform and provider versions

Terraform v1.11.0
on darwin_arm64
+ provider registry.terraform.io/databricks/databricks v1.70.0
+ provider registry.terraform.io/hashicorp/google v6.27.0
+ provider registry.terraform.io/hashicorp/vault v4.7.0

Is it a regression?

nope, at least for me it didn't work before ( :

Debug Output

Important Factoids

Would you like to implement a fix?

i would but i suspect that its an dbx API thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant