-
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
[ISSUE] The account_id
attribute is sometimes not populated when updating databricks_mws_workspaces
#649
Comments
@tonybaron please provide more context, including cmk & workspace resource configs. and cmk request traffic. it might be the case that some resources didn't return proper content and this happened. |
Hi @nfx. Sorry for the delay. CMK resource config:
Workspace resource config:
And some more logs:
Edited comment to reflect that I'm trying to apply the storage CMK, not the managed services CMK as I don't believe the latter can be added to a workspace. |
@nfx As an aside, related to my previous comment, I see that the accounts REST API is returning a 200 when I try to add a managed services CMK. According to the documentation, that is only available when a workspace is created. This isn't reflected in the Terraform documentation at all, and led to a lot of confusion until I dug into the documentation further. Could you route that issue to the correct party? I would expect that to return some 4xx with a clear error message. |
@tonybaron Can you send a PR with a suggested change to docs/resources/customer_managed_key.md?.. |
My org is running into this issue updating a database_mws_workspaces object. I suspect a bug at https://github.com/databrickslabs/terraform-provider-databricks/blob/master/mws/resource_workspace.go#L110 since I don't see AccountID being populated in the workspace object being passed to the client.Patch method. |
@mbarrien Good catch! We'll look into this soon. You can accelerate this by submitting a PR |
* Each time there's a workspace change diff, it's checked only for the allowed fields to be updated * `PATCH /accounts/.../workspaces/..` only contains allowed fields
* Each time there's a workspace change diff, it's checked only for the allowed fields to be updated * `PATCH /accounts/.../workspaces/..` only contains allowed fields
* Each time there's a workspace change diff, it's checked only for the allowed fields to be updated * `PATCH /accounts/.../workspaces/..` only contains allowed fields
* Each time there's a workspace change diff, it's checked only for the allowed fields to be updated * `PATCH /accounts/.../workspaces/..` only contains allowed fields
* Each time there's a workspace change diff, it's checked only for the allowed fields to be updated * `PATCH /accounts/.../workspaces/..` only contains allowed fields
Hi there,
It appears that the
account_id
attribute is sometimes not being populated when PATCHingdatabricks_mws_workspaces
. The API returnsMALFORMED_REQUEST: Invalid AccountId:
because theaccount_id
is an empty string on the patch request.In my case this was related to adding customer managed key configurations.
Performing the below request manually with the REST API, but populating the
account_id
correctly resulted in the API returning a 200.Terraform Version
0.13.6
Provider Version
0.3.4
Affected Resource(s)
Debug Output
Expected Behavior
The workspace should be updated with new attributes.
Actual Behavior
The API returns a 400 and fails to update AND the terraform state thinks that things are successfully applied. Subsequent requests do not attempt to modify this resource.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
databricks_mws_workspaces
. In my case it was customer managed keys related, but I'm not sure if it is specific to that.terraform apply
The text was updated successfully, but these errors were encountered: