terraform-provider-databricks
terraform-provider-databricks copied to clipboard
[ISSUE] Issue with `databricks_connection` resource (Salesforce connction)
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
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
@alexott, do you mind checking this? It will be much appreciated
It's on the API side, not in Terraform. Unfortunately options for connections API isn't well documented
It's on the API side, not in Terraform. Unfortunately options for connections API isn't well documented
Is there any plan to add proper support for this?
it's a question to lakehouse federation team, not to Terraform developers.