Skip to content
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

[Fix] Remove config drift if Azure SP is used in databricks_credential #4294

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions catalog/resource_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ func ResourceCredential() common.Resource {
if err != nil {
return err
}
// azure client secret is sensitive, so we need to preserve it
var credOrig catalog.CredentialInfo
common.DataToStructPointer(d, credentialSchema, &credOrig)
if credOrig.AzureServicePrincipal != nil {
if credOrig.AzureServicePrincipal.ClientSecret != "" {
cred.AzureServicePrincipal.ClientSecret = credOrig.AzureServicePrincipal.ClientSecret
}
}
d.Set("credential_id", cred.Id)
return common.StructToData(cred, credentialSchema, d)
},
Expand Down
Loading