-
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
2d6f936
to
7c7d955
Compare
7c7d955
to
d69205d
Compare
7fc50cc
to
efa7b2d
Compare
…deprecate xx_key_vault_id for cross subscription support as not required add deprecate in 5.0 beta
8ccc2e8
to
a246a75
Compare
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.