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

Add databricks_mws_credentials data source #1909

Merged
merged 7 commits into from
Jan 16, 2023
Merged

Conversation

boydZD
Copy link
Contributor

@boydZD boydZD commented Jan 6, 2023

Lists all databricks_mws_credentials in Databricks Account.

-> Note account_id provider configuration property is required for this resource to work.

Example Usage

Listing all workspaces in

provider "databricks" {
  // other configuration
  account_id = "<databricks account id>"
}

data "databricks_mws_credentials" "all" {}

output "all_mws_credentials" {
  value = data.databricks_mws_credentials.all.ids
}

Attribute Reference

-> Note This resource has an evolving interface, which may change in future versions of the provider.

This data source exports the following attributes:

  • ids - name-to-id map for all of the credentials in the account

Related Resources

The following resources are used in the same context:

@alexott alexott changed the title Add databricks_instance_pool data source Add databricks_mws_credentials data source Jan 9, 2023
Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

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

Just small changes required, otherwise looks good

docs/data-sources/mws_credentials.md Outdated Show resolved Hide resolved
docs/data-sources/mws_credentials.md Outdated Show resolved Hide resolved
mws/data_mws_credentials.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2023

Codecov Report

Merging #1909 (37182d8) into master (6246208) will increase coverage by 0.01%.
The diff coverage is 69.23%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1909      +/-   ##
==========================================
+ Coverage   90.11%   90.13%   +0.01%     
==========================================
  Files         145      146       +1     
  Lines       11831    11844      +13     
==========================================
+ Hits        10662    10675      +13     
+ Misses        756      754       -2     
- Partials      413      415       +2     
Impacted Files Coverage Δ
mws/data_mws_credentials.go 66.66% <66.66%> (ø)
provider/provider.go 95.56% <100.00%> (+0.02%) ⬆️
mws/resource_mws_credentials.go 92.00% <0.00%> (+8.00%) ⬆️

@boydZD boydZD requested review from nfx and alexott January 9, 2023 19:11
Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

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

let increase test code coverage

mws/data_mws_credentials.go Show resolved Hide resolved
mws/data_mws_credentials.go Show resolved Hide resolved
@boydZD boydZD requested a review from alexott January 10, 2023 18:29
Copy link
Contributor

@alexott alexott left a comment

Choose a reason for hiding this comment

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

lgtm for me.

Cc: @nfx

@boydZD boydZD removed the request for review from nfx January 10, 2023 18:39
@nfx nfx merged commit 616c984 into databricks:master Jan 16, 2023
nfx added a commit that referenced this pull request Jan 17, 2023
# Version changelog

### 1.9.0

 * Added [databricks_mws_credentials](https://registry.terraform.io/providers/databricks/databricks/latest/docs/data-sources/mws_credentials) data source ([#1909](#1909)).
 * Fixed incorrect diff for `num_clusters` and `min_num_clusters` for stopped [databricks_sql_endpoint](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_endpoint) ([#1927](#1927)).
 * Fixed `privilege_assignment` in [databricks_sql_permissions](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_permissions) ([#1872](#1872)).
 * Documentation improvements ([#1921](#1921), [#1923](#1923)).

Updated dependency versions:

 * Bump github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2 ([#1913](#1913)).
 * Bump google.golang.org/api from 0.105.0 to 0.106.0 ([#1914](#1914)).
@nfx nfx mentioned this pull request Jan 17, 2023
nfx added a commit that referenced this pull request Jan 17, 2023
# Version changelog

### 1.9.0

 * Added [databricks_mws_credentials](https://registry.terraform.io/providers/databricks/databricks/latest/docs/data-sources/mws_credentials) data source ([#1909](#1909)).
 * Fixed incorrect diff for `num_clusters` and `min_num_clusters` for stopped [databricks_sql_endpoint](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_endpoint) ([#1927](#1927)).
 * Fixed `privilege_assignment` in [databricks_sql_permissions](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_permissions) ([#1872](#1872)).
 * Documentation improvements ([#1921](#1921), [#1923](#1923)).

Updated dependency versions:

 * Bump github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2 ([#1913](#1913)).
 * Bump google.golang.org/api from 0.105.0 to 0.106.0 ([#1914](#1914)).
michael-berk pushed a commit to michael-berk/terraform-provider-databricks that referenced this pull request Feb 15, 2023
michael-berk pushed a commit to michael-berk/terraform-provider-databricks that referenced this pull request Feb 15, 2023
# Version changelog

### 1.9.0

 * Added [databricks_mws_credentials](https://registry.terraform.io/providers/databricks/databricks/latest/docs/data-sources/mws_credentials) data source ([databricks#1909](databricks#1909)).
 * Fixed incorrect diff for `num_clusters` and `min_num_clusters` for stopped [databricks_sql_endpoint](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_endpoint) ([databricks#1927](databricks#1927)).
 * Fixed `privilege_assignment` in [databricks_sql_permissions](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_permissions) ([databricks#1872](databricks#1872)).
 * Documentation improvements ([databricks#1921](databricks#1921), [databricks#1923](databricks#1923)).

Updated dependency versions:

 * Bump github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2 ([databricks#1913](databricks#1913)).
 * Bump google.golang.org/api from 0.105.0 to 0.106.0 ([databricks#1914](databricks#1914)).
@boydZD boydZD deleted the issue-1486 branch March 1, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Enhancements for databricks_clusters and databricks_warehouses data sources
4 participants