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

Give all access connectors Storage Blob Data Contributor role #1425

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
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: 7 additions & 1 deletion src/databricks/labs/ucx/azure/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,13 @@ def create_access_connectors_for_storage_accounts(self) -> list[AccessConnector]
for storage_account in self._azurerm.storage_accounts():
if storage_account.name not in used_storage_accounts:
continue
tasks.append(partial(self._create_access_connector_for_storage_account, storage_account=storage_account))
task = partial(
self._create_access_connector_for_storage_account,
storage_account=storage_account,
# Fine-grained access is configured within Databricks through unity
role_name="STORAGE_BLOB_DATA_CONTRIBUTOR",
)
tasks.append(task)

thread_name = "Creating access connectors for storage accounts"
results, errors = Threads.gather(thread_name, tasks)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/azure/test_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,4 @@ def test_create_access_connectors_for_storage_accounts_log_permission_applied(ca

with caplog.at_level(logging.DEBUG, logger="databricks.labs.ucx"):
azure_resource_permission.create_access_connectors_for_storage_accounts()
assert any("STORAGE_BLOB_DATA_READER" in message for message in caplog.messages)
assert any("STORAGE_BLOB_DATA_CONTRIBUTOR" in message for message in caplog.messages)
Loading