-
Notifications
You must be signed in to change notification settings - Fork 377
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
Exporter: export permissions for databricks_notebook
& databricks_directory
#1908
Conversation
the test fails, will debug more on that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments. Also, tests are completely missing for new functionality
Another issue - you can't expose user's directories or something like |
Can you explain more on this? thanks! |
will add tests after we finalize the right solution, thanks! |
In general, it would be less work if the intended design would be first coordinated/discussed, as I was already starting working on this issue. To the rest of the comments:
|
@alexott , apologies that we don't know that you started working on this issue, if you think it is easier for you to implement this, feel free to close this PR, and change the owner in the following spreadsheet, thank you! https://docs.google.com/spreadsheets/d/1IA8oBNczSPrt2NmATbY8X0V7JhIpm2oKPTWY_4HfxsM/edit#gid=0
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1908 +/- ##
==========================================
- Coverage 90.34% 90.28% -0.07%
==========================================
Files 136 136
Lines 10887 10968 +81
==========================================
+ Hits 9836 9902 +66
- Misses 665 674 +9
- Partials 386 392 +6
|
… tests for filter function
@qili86 any updates? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Tested
For notebook,
it generates the permission block in the
access.tf
, an example is:resource "databricks_permissions" "notebook_users_qi_li_mckesson_com_tf_idf_test_3534645884600778" { notebook_id = "3534645884600778" access_control { user_name = "XXXXXXXX" (replace the real email) permission_level = "CAN_READ" } }
in
import.sh
, it generates a new line:terraform import databricks_permissions.notebook_users_qi_li_mckesson_com_tf_idf_test_3534645884600778 "/notebooks/3534645884600778"
For directory:
it generates the permission block in the
access.tf
, an example is:resource "databricks_permissions" "directory_users_qi_li_mckesson_com_directory_test_2864623526846789" { directory_id = "2864623526846789" access_control { user_name = "XXXXXXXX". (replace the real email) permission_level = "CAN_READ" } }
in
import.sh
, it generates a new line:terraform import databricks_permissions.directory_users_qi_li_mckesson_com_directory_test_2864623526846789 "/directories/2864623526846789"
This fixes #1850