Skip to content

dbx-workspace: give listed account users access to a new AWS workspace - #14

Merged
kchandan merged 1 commit into
mainfrom
dbx-workspace-admins
Oct 28, 2026
Merged

kchandan merged 1 commit into
mainfrom
dbx-workspace-admins

Conversation

@kchandan

Copy link
Copy Markdown
Member

What

The service principal that creates a workspace is its only user at first, so people had to add themselves by hand. This adds two AWS options:

  • --param admin_emails=a@x.com,b@x.com: each address is looked up as an existing Databricks account user and assigned to the workspace with databricks_mws_permission_assignment.
  • --param admin_role=ADMIN|USER (default ADMIN).

Nothing changes when admin_emails is not set. The run stops at preflight on a bad email or role, and on Azure. Emails go only into the private variables file and Terraform state, not the pack records or output.

Tested

  • Module: 8 mocked-provider terraform test cases (new: none by default, two users with ADMIN, bad email and role refused). terraform fmt clean.
  • Pack: 37 tests (new: emails reach only the variables file, no extra variables when unset, bad input refused before anything runs, refused on Azure). Full suite 408 passed, 1 skipped. PII scan clean.
  • Not applied against a real workspace. The provider docs do not say whether the workspace needs identity federation for account-level assignment. A real launch with admin_emails is the test.

🤖 Generated with Claude Code

admin_emails looks up each address as an existing Databricks account user and assigns the
workspace role (ADMIN by default). Emails stay in the private variables file and Terraform
state, not in the pack records or output.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kchandan kchandan added the enhancement New feature or request label Oct 28, 2026
@kchandan
kchandan merged commit 0f114a7 into main Oct 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant