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

Exporter: phase 1 of support for Account-level exports #2205

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Apr 9, 2023

Changes

Implemented export of users/groups/service principals on account level, including generation of corresponding role objects to support account_admin role.

To support role export, was need to make roles exclusion for users/service principals configurable.

Current limitation: not all users & service principals could be exported - will require addition of the dedicated List implementation for these resources, as account users group isn't returned by the API. They will be implemented in the phase 2, together with additional test coverage

Tests

  • make test run locally
  • relevant change in docs/ folder
  • tested manually
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

@alexott alexott requested review from a team April 9, 2023 09:20
@codecov-commenter
Copy link

codecov-commenter commented Apr 9, 2023

Codecov Report

Merging #2205 (348746a) into master (c81812c) will decrease coverage by 0.09%.
The diff coverage is 67.44%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2205      +/-   ##
==========================================
- Coverage   88.78%   88.69%   -0.09%     
==========================================
  Files         137      137              
  Lines       11262    11282      +20     
==========================================
+ Hits         9999    10007       +8     
- Misses        852      859       +7     
- Partials      411      416       +5     
Impacted Files Coverage Δ
exporter/model.go 91.66% <ø> (ø)
exporter/context.go 84.49% <29.41%> (-1.98%) ⬇️
exporter/util.go 88.88% <85.71%> (-0.22%) ⬇️
exporter/importables.go 89.95% <100.00%> (-0.05%) ⬇️
scim/data_service_principal.go 100.00% <100.00%> (ø)
scim/data_service_principals.go 100.00% <100.00%> (ø)
scim/data_user.go 96.87% <100.00%> (ø)
scim/resource_service_principal.go 96.24% <100.00%> (+0.02%) ⬆️
scim/resource_user.go 94.00% <100.00%> (ø)
scim/users.go 89.47% <100.00%> (+0.28%) ⬆️

Copy link
Contributor

@nfx nfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rebase

Implemented export of users/groups/service principals on account level, including
generation of corresponding role objects to support `account_admin` role.

To support role export, was need to make roles exclusion for users/service principals
configurable.

Current limitation: not all users & service principals could be exported - will require
addition of the dedicated `List` implementation for these resources, as `account users`
group isn't returned by the API.
@alexott alexott force-pushed the exporter-account-level-1 branch from 9613e50 to 348746a Compare April 12, 2023 09:25
@alexott
Copy link
Contributor Author

alexott commented Apr 12, 2023

rebase is done

@nfx nfx merged commit 65564f1 into master Apr 13, 2023
@nfx nfx deleted the exporter-account-level-1 branch April 13, 2023 09:46
nfx added a commit that referenced this pull request Apr 14, 2023
# Version changelog

## 1.14.3

 * Add exporter support for [databricks_sql_alert](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_alert) ([#2207](#2207)).
 * Add support for notifications in [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) resource ([#2218](#2218)).
 * Add suppress diff for `path` argument of [databricks_directory](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/directory) resource when it ends with `/` ([#2204](#2204)).
 * Exporter: don't export `storage` when [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) was created with default value ([#2203](#2203)).
 * Exporter: phase 1 of support for Account-level exports ([#2205](#2205)).
 * Fixed regression in [databricks_group](https://registry.terraform.io/providers/databricks/databricks/latest/docs/data-sources/group) data not to require workspace admin privileges ([#2210](#2210)).
 * Suppress diff for `edition` attribute in [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) ([#2219](#2219)).
@nfx nfx mentioned this pull request Apr 14, 2023
nfx added a commit that referenced this pull request Apr 14, 2023
# Version changelog

## 1.14.3

 * Add exporter support for [databricks_sql_alert](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_alert) ([#2207](#2207)).
 * Add support for notifications in [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) resource ([#2218](#2218)).
 * Add suppress diff for `path` argument of [databricks_directory](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/directory) resource when it ends with `/` ([#2204](#2204)).
 * Exporter: don't export `storage` when [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) was created with default value ([#2203](#2203)).
 * Exporter: phase 1 of support for Account-level exports ([#2205](#2205)).
 * Fixed regression in [databricks_group](https://registry.terraform.io/providers/databricks/databricks/latest/docs/data-sources/group) data not to require workspace admin privileges ([#2210](#2210)).
 * Suppress diff for `edition` attribute in [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) ([#2219](#2219)).
slwbuild pushed a commit to slwbuild/terraform-provider-databricks that referenced this pull request Apr 24, 2023
Implemented export of users/groups/service principals on account level, including
generation of corresponding role objects to support `account_admin` role.

To support role export, was need to make roles exclusion for users/service principals
configurable.

Current limitation: not all users & service principals could be exported - will require
addition of the dedicated `List` implementation for these resources, as `account users`
group isn't returned by the API.
slwbuild pushed a commit to slwbuild/terraform-provider-databricks that referenced this pull request Apr 24, 2023
# Version changelog

## 1.14.3

 * Add exporter support for [databricks_sql_alert](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_alert) ([databricks#2207](databricks#2207)).
 * Add support for notifications in [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) resource ([databricks#2218](databricks#2218)).
 * Add suppress diff for `path` argument of [databricks_directory](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/directory) resource when it ends with `/` ([databricks#2204](databricks#2204)).
 * Exporter: don't export `storage` when [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) was created with default value ([databricks#2203](databricks#2203)).
 * Exporter: phase 1 of support for Account-level exports ([databricks#2205](databricks#2205)).
 * Fixed regression in [databricks_group](https://registry.terraform.io/providers/databricks/databricks/latest/docs/data-sources/group) data not to require workspace admin privileges ([databricks#2210](databricks#2210)).
 * Suppress diff for `edition` attribute in [databricks_pipeline](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/pipeline) ([databricks#2219](databricks#2219)).
@alexott alexott added the exporter TF configuration generator label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter TF configuration generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants