-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_databricks_workspace
: managed service/disk support managed hsm key
#27849
base: main
Are you sure you want to change the base?
Conversation
e966538
to
3f24aa5
Compare
904ccf6
to
bd0c744
Compare
azurerm_databricks_workspace
: managed service support managed hsm keyazurerm_databricks_workspace
: managed service/disk support managed hsm key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @wuxu92, I have given this PR and it mostly looks good, however I have left a few minor comments around the schema and depreciation text. If you can get those fixed up, I think this will be good to move out of draft state. 🚀
"managed_services_cmk_key_vault_id": { | ||
Type: pluginsdk.TypeString, | ||
Optional: true, | ||
ValidateFunc: commonids.ValidateKeyVaultID, | ||
Deprecated: "Use 'managed_services_cmk_key_vault_key_id' instead, this field is not needed for cross subscription key vaults anymore", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this conflict with managed_services_cmk_key_vault_key_id
?
"managed_services_cmk_key_vault_id": { | |
Type: pluginsdk.TypeString, | |
Optional: true, | |
ValidateFunc: commonids.ValidateKeyVaultID, | |
Deprecated: "Use 'managed_services_cmk_key_vault_key_id' instead, this field is not needed for cross subscription key vaults anymore", | |
"managed_services_cmk_key_vault_id": { | |
Type: pluginsdk.TypeString, | |
Optional: true, | |
ValidateFunc: commonids.ValidateKeyVaultID, | |
Deprecated: "'managed_services_cmk_key_vault_id' has been deprecated in favor of 'managed_services_cmk_key_vault_key_id' and will be removed in v5.0 of the provider", | |
ConflictsWith: []string{"managed_services_cmk_key_vault_key_id"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot add ConflictsWith
here because some users may have set both managed_services_cmk_key_vault_id
and managed_services_cmk_key_vault_key_id
. Do you mean the new managed_disk_cmk_managed_hsm_key_id
property should conflict with managed_services_cmk_key_vault_id
? That would be reasonable. I updated it.
|
||
"managed_disk_cmk_key_vault_id": { | ||
Type: pluginsdk.TypeString, | ||
Optional: true, | ||
ValidateFunc: commonids.ValidateKeyVaultID, | ||
Deprecated: "Use 'managed_disk_cmk_key_vault_key_id' instead, this field is not needed for cross subscription key vaults anymore", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"managed_disk_cmk_key_vault_id": { | |
Type: pluginsdk.TypeString, | |
Optional: true, | |
ValidateFunc: commonids.ValidateKeyVaultID, | |
Deprecated: "Use 'managed_disk_cmk_key_vault_key_id' instead, this field is not needed for cross subscription key vaults anymore", | |
"managed_disk_cmk_key_vault_id": { | |
Type: pluginsdk.TypeString, | |
Optional: true, | |
ValidateFunc: commonids.ValidateKeyVaultID, | |
Deprecated: "'managed_disk_cmk_key_vault_id' has been deprecated in favor of 'managed_disk_cmk_key_vault_key_id' and will be removed in v5.0 of the provider", | |
ConflictsWith: []string{"managed_disk_cmk_key_vault_key_id"}, |
Type: pluginsdk.TypeString, | ||
Optional: true, | ||
ValidateFunc: keyVaultValidate.KeyVaultChildID, | ||
ConflictsWith: []string{"managed_disk_cmk_managed_hsm_key_id"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this also conflict with managed_disk_cmk_key_vault_id
?
ConflictsWith: []string{"managed_disk_cmk_managed_hsm_key_id"}, | |
ConflictsWith: []string{"managed_disk_cmk_managed_hsm_key_id", "managed_disk_cmk_key_vault_id"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like above, we cannot have it conflict with managed_disk_cmk_key_vault_id
here.
eb448b5
to
ff0df84
Compare
@wuxu92, thanks for pushing those changes so quickly. This LGTM now! 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @wuxu92, could you please follow the guidance in our breaking changes guide when deprecating properties? Once those changes have been made can you please also provide testing evidence in both 4.x and 5.0 mode. Thanks!
Hi @stephybun, since those two properties are not needed for the business, they are just read from the config and set back to the state even in the original logic. Therefore, I merely marked them as deprecated. If you think it's still necessary, I can add the required work for a breaking change. |
Yes, please still follow the guidance that I linked. This will ensure that the property is actually removed in 5.0 and we don't need to remember to remove it from the schema in the week of the major release. Make sure to update any affected tests as well as the upgrade guide too. |
b934160
to
2d6f936
Compare
7fc50cc
to
efa7b2d
Compare
8ccc2e8
to
a246a75
Compare
a246a75
to
ca16ca4
Compare
This PR is being labeled as "stale" because it has not been updated for 30 or more days. If this PR is still valid, please remove the "stale" label. If this PR is blocked, please add it to the "Blocked" milestone. If you need some help completing this PR, please leave a comment letting us know. Thank you! |
ca16ca4
to
6bab973
Compare
@wuxu92 I started a review on this a while ago, but since then the CreateUpdate method in this resource has been split. Could you please rebase this PR? I can continue the review once that's been done. |
…deprecate xx_key_vault_id for cross subscription support as not required add deprecate in 5.0 beta
6bab973
to
51ae7a1
Compare
@stephybun I rebased the main branch and updated the corresponding code. |
Community Note
Description
DRAFT FOR INTERNAL REVIEW
This PR adds Managed HSM Key support for both managed services and managed disks.
It also deprecates the optional key vault ID property for both, as it is unnecessary. The Databricks server can validate the key's availability, so
managed_services_cmk_key_vault_id
andmanaged_disk_cmk_key_vault_id
have been removed from the documentation. A deprecated description has been added to them, but they are not being removed from the schema to avoid introducing a breaking change.PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_databricks_workspace
- support managed hsm key as managed service and managed disk encription [azurerm_databricks_workspace - missing support for keys from a Managed HSM Key Vault #27738]This is a (please select all that apply):
Related Issue(s)
Fixes #27738
Note
If this PR changes meaningfully during the course of review please update the title and description as required.