Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 213
Include a permissions section in all templates#1713
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
Merged
lennartkats-db
merged 2 commits into
databricks:main
from
lennartkats-db:permissions-in-templatesSep 3, 2024
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
17 changes: 9 additions & 8 deletions
17 libs/template/templates/dbt-sql/template/{{.project_name}}/databricks.yml.tmpl
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
36 changes: 8 additions & 28 deletions
36 libs/template/templates/default-python/template/{{.project_name}}/databricks.yml.tmpl
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -7,44 +7,24 @@ include: | ||
| - resources/*.yml | ||
| targets: | ||
| # The 'dev' target, for development purposes. This target is the default. | ||
| dev: | ||
| # We use 'mode: development' to indicate this is a personal development copy: | ||
| # The default target uses 'mode: development' to create a development copy. | ||
| # - Deployed resources get prefixed with '[dev my_user_name]' | ||
| # - Any job schedules and triggers are paused by default | ||
| # - The 'development' mode is used for Delta Live Tables pipelines | ||
| # - Any job schedules and triggers are paused by default. | ||
| # See also https://docs.databricks.com/dev-tools/bundles/deployment-modes.html. | ||
| mode: development | ||
| default: true | ||
| workspace: | ||
| host: {{workspace_host}} | ||
| ## Optionally, there could be a 'staging' target here. | ||
lennartkats-db marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ## (See Databricks docs on CI/CD at https://docs.databricks.com/dev-tools/bundles/ci-cd.html.) | ||
| # | ||
| # staging: | ||
| # workspace: | ||
| # host: {{workspace_host}} | ||
| # The 'prod' target, used for production deployment. | ||
| prod: | ||
| # We use 'mode: production' to indicate this is a production deployment. | ||
| # Doing so enables strict verification of the settings below. | ||
| mode: production | ||
| workspace: | ||
| host: {{workspace_host}} | ||
| # We always use /Users/{{user_name}} for all resources to make sure we only have a single copy. | ||
| {{- /* | ||
| Internal note 2023-12: CLI versions v0.211.0 and before would show an error when using `mode: production` | ||
| with a path that doesn't say "/Shared". For now, we'll include an extra comment in the template | ||
| to explain that customers should update if they see this. | ||
| */}} | ||
| # If this path results in an error, please make sure you have a recent version of the CLI installed. | ||
| # We explicitly specify /Users/{{user_name}} to make sure we only have a single copy. | ||
| root_path: /Users/{{user_name}}/.bundle/${bundle.name}/${bundle.target} | ||
| permissions: | ||
| - {{if is_service_principal}}service_principal{{else}}user{{end}}_name: {{user_name}} | ||
| level: CAN_MANAGE | ||
| run_as: | ||
| {{- if is_service_principal}} | ||
| service_principal_name: {{user_name}} | ||
| {{- else}} | ||
| # This runs as {{user_name}} in production. We could also use a service principal here, | ||
| # see https://docs.databricks.com/dev-tools/bundles/permissions.html. | ||
| user_name: {{user_name}} | ||
| {{- end}} | ||
| {{if is_service_principal}}service_principal{{else}}user{{end}}_name: {{user_name}} | ||
39 changes: 11 additions & 28 deletions
39 libs/template/templates/default-sql/template/{{.project_name}}/databricks.yml.tmpl
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
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.
Uh oh!
There was an error while loading. Please reload this page.