Skip to content

r/databricks_workspace: support for workspace parameters#3889

Merged
katbyte merged 2 commits into
hashicorp:masterfrom
notchairmk:databricks_params
Jan 20, 2020
Merged

r/databricks_workspace: support for workspace parameters#3889
katbyte merged 2 commits into
hashicorp:masterfrom
notchairmk:databricks_params

Conversation

@notchairmk

@notchairmk notchairmk commented Jul 19, 2019

Copy link
Copy Markdown
Contributor

Allows for optional map of workspace parameter key/values (e.g. customPrivateSubnetName, customPublicSubnetName). https://docs.microsoft.com/en-us/rest/api/databricks/workspaces/createorupdate#workspace

The list of accepted parameter keys included in the doc updates was provided in a response through the sdk with a disallowed parameter. Can't find the list in any other documentation though.

Includes test updates.

Fixes #3001

@tombuildsstuff

Copy link
Copy Markdown
Contributor

hey @notchairmk

Thanks for this PR :)

Taking a look through whilst this approach works, there's several limitations to it (for example, where we're unable to provide validation for the specific fields to confirm that a Resource ID is a Resource ID at plan time) - that I think this may want to take a slightly different approach.

In the azurerm_redis_cache resource the API takes a similar approach (requiring a key-value pair of parameters) but we instead define a Terraform Schema for those fields and then map from the Terraform Schema to the Redis Configuration and map back from the Redis Configuration to the Terraform Schema which means that we can get the best of both worlds.

As such - could we update this PR to take a similar approach?

Thanks!

@tombuildsstuff

Copy link
Copy Markdown
Contributor

Just to add an update here: I've opened a PR on the Swagger repository making this a struct rather than a dictionary, so that we can expose this accordingly: Azure/azure-rest-api-specs#6917

@notchairmk

Copy link
Copy Markdown
Contributor Author

Okay awesome, that is what I wasn't sure how to get done. Thanks!

@ghost ghost removed the waiting-response label Aug 12, 2019
@katbyte katbyte added this to the Blocked milestone Aug 12, 2019
@katbyte katbyte added the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label Aug 12, 2019
@katbyte

katbyte commented Jan 9, 2020

Copy link
Copy Markdown
Collaborator

@notchairmk, we just merged v38 of the sdk today, so this should be unblocked!

@katbyte katbyte modified the milestones: Blocked, v1.41.0 Jan 9, 2020
@ghost ghost added size/L and removed size/S labels Jan 10, 2020

@katbyte katbyte left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for updating the PR @notchairmk, just one comment left about nil checks that once addressed this should be good to merge

Comment thread azurerm/internal/services/databricks/resource_arm_databricks_workspace.go Outdated
Comment thread azurerm/internal/services/databricks/resource_arm_databricks_workspace.go Outdated
Comment thread azurerm/internal/services/databricks/resource_arm_databricks_workspace.go Outdated
@tombuildsstuff tombuildsstuff removed the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label Jan 13, 2020
Comment thread azurerm/internal/services/databricks/resource_arm_databricks_workspace.go Outdated
@notchairmk

Copy link
Copy Markdown
Contributor Author

thanks @katbyte, updated, all suggestions should now be addressed

@ghost ghost removed the waiting-response label Jan 13, 2020
@notchairmk notchairmk requested a review from katbyte January 13, 2020 21:03
@tombuildsstuff tombuildsstuff modified the milestones: v1.41.0, v1.42.0 Jan 14, 2020

@katbyte katbyte left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @notchairmk,

This looks great now, however could you merge in master so we can ensure all the travis CI checks pass? thanks!

@notchairmk

Copy link
Copy Markdown
Contributor Author

Alright, rebased off of master and fixed spacing for tflint.

@ghost ghost removed the waiting-response label Jan 20, 2020
@notchairmk notchairmk requested a review from katbyte January 20, 2020 22:23

@katbyte katbyte left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @notchairmk! LGTM now 👍

@katbyte katbyte merged commit bc9c706 into hashicorp:master Jan 20, 2020
katbyte added a commit that referenced this pull request Jan 20, 2020
@ghost

ghost commented Jan 27, 2020

Copy link
Copy Markdown

This has been released in version 1.42.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.42.0"
}
# ... other configuration ...

@ghost ghost unassigned mbfrahry Jan 27, 2020
@ghost

ghost commented Mar 28, 2020

Copy link
Copy Markdown

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
@notchairmk notchairmk deleted the databricks_params branch December 26, 2020 18:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: azurerm_databricks_workspace Private Network

4 participants