-
Notifications
You must be signed in to change notification settings - Fork 393
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 suppress diff for path
argument of databricks_directory
resource when it ends with /
#2204
Merged
Conversation
This file contains 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
…rce when it ends with `/` Right now if we have directory declared as follows: ```hcl resource "databricks_directory" "test" { path = "/Users/user@domain/TF_DIR_WITH_SLASH/" } ``` on update it's trying to recreate resource because REST API returns normalized path, without ending `/`, and this leads to following: ``` # databricks_directory.test must be replaced -/+ resource "databricks_directory" "test" { ~ id = "/Users/user@domain/TF_DIR_WITH_SLASH/" -> (known after apply) ~ object_id = 696671922817959 -> (known after apply) ~ path = "/Users/user@domain/TF_DIR_WITH_SLASH" -> "/Users/user@domain/TF_DIR_WITH_SLASH/" # forces replacement # (1 unchanged attribute hidden) } ``` this patch fixes this behavior
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2204 +/- ##
=======================================
Coverage 88.74% 88.74%
=======================================
Files 137 137
Lines 11220 11222 +2
=======================================
+ Hits 9957 9959 +2
Misses 853 853
Partials 410 410
|
nfx
approved these changes
Apr 11, 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)).
Merged
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
…rce when it ends with `/` (databricks#2204) Right now if we have directory declared as follows: ```hcl resource "databricks_directory" "test" { path = "/Users/user@domain/TF_DIR_WITH_SLASH/" } ``` on update it's trying to recreate resource because REST API returns normalized path, without ending `/`, and this leads to following: ``` # databricks_directory.test must be replaced -/+ resource "databricks_directory" "test" { ~ id = "/Users/user@domain/TF_DIR_WITH_SLASH/" -> (known after apply) ~ object_id = 696671922817959 -> (known after apply) ~ path = "/Users/user@domain/TF_DIR_WITH_SLASH" -> "/Users/user@domain/TF_DIR_WITH_SLASH/" # forces replacement # (1 unchanged attribute hidden) } ``` this patch fixes this behavior
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)).
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.
Changes
Right now if we have directory declared as follows:
on update it's trying to recreate resource because REST API returns normalized path, without ending
/
, and this leads to following:this patch fixes this behavior
Tests
make test
run locallydocs/
folderinternal/acceptance