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 suppress diff for path argument of databricks_directory resource when it ends with / #2204

Merged
merged 2 commits into from
Apr 11, 2023

Commits on Apr 8, 2023

  1. Add suppress diff for path argument of databricks_directory resou…

    …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
    alexott committed Apr 8, 2023
    Configuration menu
    Copy the full SHA
    3b1b952 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2023

  1. Configuration menu
    Copy the full SHA
    005e916 View commit details
    Browse the repository at this point in the history