Introduce new bundle variable: ${workspace.current_user.domain_friendly_name}#3623
Merged
Introduce new bundle variable: ${workspace.current_user.domain_friendly_name}#3623
${workspace.current_user.domain_friendly_name}#3623Conversation
Collaborator
|
anton-107
added a commit
that referenced
this pull request
Sep 18, 2025
…/textutil` (#3621) ## Why <!-- Why are these changes needed? Provide the context that the reviewer might be missing. For example, were there any decisions behind the change that are not reflected in the code itself? --> - Text transformation logic can be useful outside the domain of working with tags - I am currently planning to re-use it for populating a dns-friendly short user name in a following PR: #3623 ## Tests <!-- How have you tested the changes? --> Existing tests <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
6af25b7 to
67c402b
Compare
${workspace.current_user.dns_name} bundle variable${workspace.current_user.dns_name}
denik
reviewed
Sep 18, 2025
0013ca1 to
9cea6d4
Compare
${workspace.current_user.dns_name}${workspace.current_user.domain_friendly_name}
denik
reviewed
Sep 22, 2025
denik
approved these changes
Sep 22, 2025
pietern
reviewed
Sep 22, 2025
Contributor
pietern
left a comment
There was a problem hiding this comment.
FYI the PR summary still mentions dns_name.
| @@ -1,4 +1,4 @@ | |||
| Local = true | |||
| Local = false | |||
|
|
||
| // A short name for the user that is stripped off of non-alphanumeric character | ||
| // Can be used as a prefix for resources that use their name as part of their URL (e.g. Apps, Database Instances) | ||
| DomainFriendlyName string `json:"domain_friendly_name,omitempty" bundle:"readonly"` |
Contributor
There was a problem hiding this comment.
A short name for the user that is stripped
offof non-alphanumeric characters.
Can also mention dashes instead of underscores.
| // GetShortUserDomainFriendlyName returns a dns-friendly for of the user name based on short name | ||
| // We replace all non-alphanumeric characters with a dash (following Databricks Apps' naming requirements) | ||
| func GetShortUserDomainFriendlyName(user *iam.User) string { | ||
| name := GetShortUserName(user) |
Contributor
There was a problem hiding this comment.
This means double normalization. This function already calls NormalizeString.
Doesn't below have the same effect, aside from also normalizing "é" into "e"?
deco-sdk-tagging bot
added a commit
that referenced
this pull request
Sep 24, 2025
## Release v0.270.0 ### Notable Changes * Add 'databricks bundle plan' command. This command shows the deployment plan for the current bundle configuration without making any changes. ([#3530](#3530)) ### Bundles * Add 'databricks bundle plan' command ([#3530](#3530)) * Add new Lakeflow Pipelines support for bundle generate ([#3568](#3568)) * Fix bundle deploy to not update permissions or grants for unbound resources ([#3642](#3642)) * Introduce new bundle variable: `${workspace.current_user.domain_friendly_name}` ([#3623](#3623)) * Improve the output of bundle run when bundle is not deployed ([#3652](#3652))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
${workspace.current_user.domain_friendly_name}will allow bundle authors to prefix apps and database instances resources with caller's usernames (useful for development targets). Currentlyshort_namedoes not always fit this purpose because it can contain characters that apps / database instances do not allow in the names of resources.Tests
domain_friendly_namecan be used as a bundle variable