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

Initial support for Azure MSI authentication #743

Merged
merged 6 commits into from
Oct 1, 2021
Merged

Initial support for Azure MSI authentication #743

merged 6 commits into from
Oct 1, 2021

Conversation

nfx
Copy link
Contributor

@nfx nfx commented Jul 27, 2021

Authenticating with Azure MSI

Since v0.3.8, it's possible to leverage Azure Managed Service Identity authentication, which is using the same environment variables as azurerm provider. Both SystemAssigned and UserAssigned identities work, as long as they have Contributor role on subscription level and created the workspace resource, or directly added to workspace through databricks_service_principal.

provider "databricks" {
  host = data.azurerm_databricks_workspace.this.workspace_url
  
  # ARM_USE_MSI environment variable is recommended
  azure_use_msi = true 
}

@nfx nfx linked an issue Jul 27, 2021 that may be closed by this pull request
@nfx nfx added the azure Occurring on Azure cloud label Jul 27, 2021
@nfx nfx changed the title Azure MSI support [DRAFT] Azure MSI support Aug 3, 2021
@codecov
Copy link

codecov bot commented Aug 30, 2021

Codecov Report

Merging #743 (a1ef8d6) into master (94cd29c) will decrease coverage by 0.06%.
The diff coverage is 67.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #743      +/-   ##
==========================================
- Coverage   82.98%   82.92%   -0.07%     
==========================================
  Files          92       92              
  Lines        8179     8191      +12     
==========================================
+ Hits         6787     6792       +5     
- Misses        891      898       +7     
  Partials      501      501              
Impacted Files Coverage Δ
access/resource_secret_scope.go 87.50% <0.00%> (ø)
identity/resource_service_principal.go 84.41% <ø> (ø)
common/azure_auth.go 72.94% <47.82%> (-2.97%) ⬇️
common/azure_cli_auth.go 95.00% <100.00%> (+2.81%) ⬆️
common/client.go 80.60% <100.00%> (-0.12%) ⬇️
common/gcp.go 83.33% <100.00%> (ø)
common/http.go 85.46% <100.00%> (ø)
provider/provider.go 94.44% <100.00%> (+0.04%) ⬆️
sqlanalytics/resource_widget.go 86.13% <0.00%> (+0.72%) ⬆️

@nfx nfx added this to the v0.3.8 milestone Sep 2, 2021
@nfx nfx requested a review from alexott September 2, 2021 17:07
@nfx nfx marked this pull request as ready for review September 2, 2021 17:07
Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, we need docs for it.

@nfx nfx changed the title [DRAFT] Azure MSI support Azure MSI support Oct 1, 2021
@nfx nfx changed the title Azure MSI support Initial support for Azure MSI authentication Oct 1, 2021
Copy link
Contributor Author

@nfx nfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed again and looks fine

@nfx nfx merged commit 526961d into master Oct 1, 2021
@nfx nfx deleted the msi-auth branch October 1, 2021 20:29
@nfx nfx mentioned this pull request Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure Occurring on Azure cloud
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Support for MSI authentication on Azure
2 participants