azurerm_machine_learning_workspace - support service_side_encryption_enabled property#30478
Conversation
…m into aml-service-side-encryption
WodansSon
left a comment
There was a problem hiding this comment.
@teowa, thanks for opening this PR, I have given it a look and while it mostly LGTM, I think there are some issues that need to be addressed or clarified. I have left a few comments, have a look when you get a chance. Thanks! 🚀
| Optional: true, | ||
| ForceNew: true, | ||
| Default: false, | ||
| RequiredWith: []string{"encryption"}, |
There was a problem hiding this comment.
Since this new field is RequiredWith the existing field encryption, wouldn't this be a breaking change? Users that already have existing instances with encryption defined would now get a an error stating the service_side_encryption_enabled is required? If so, wouldn't that also potentially lead to customer data loss since both of these fields are marked as ForceNew? Looking at the learn documentation it looks like the two are not required to be linked together:
There was a problem hiding this comment.
Hi @WodansSon , the RequiredWith here means if service_side_encryption_enabled is set, encryption block must be specified. From Azure Portal, the Use service-side encryption option can only be enabled after Encrypt data using a customer managed key is selected.


|
|
||
| * `serverless_compute` - (Optional) A `serverless_compute` block as defined below. | ||
|
|
||
| * `service_side_encryption_enabled` - (Optional) Whether to enable service-side encryption with customer-managed keys (CMK). Default to `false`. Changing this forces a new resource to be created. |
There was a problem hiding this comment.
Is this correct? Since the existing encryption field actually has the CMK implementation and this is for enabling service side encryption, which infers that the certificate which is used for the encryption will be supplied by the service? We should also add a critical note stating that When you use service-side encryption, Azure charges will continue to accrue during the soft delete retention period.
There was a problem hiding this comment.
service_side_encryption_enabled indicates that the infrastructure needed for implementing a customer-managed key (CMK) is no longer present in the customer's subscription. You can find more information at this link.
Previously, when using a customer-managed key, Azure Machine Learning creates a secondary resource group in your subscription which contains additonal resources. With this preview, this is no longer needed and all service metadata will be encrypted service-side.
note added
| sku_name = "Basic" | ||
| high_business_impact = true | ||
| public_network_access_enabled = true | ||
| service_side_encryption_enabled = true |
There was a problem hiding this comment.
I think we need more tests for this specifically, the existing test cases only test the positive test case, where service_side_encryption_enabled is always true. We need to have tests that verify that you can have the service_side_encryption_enabled false and the encryption filed with a user defined CMK(default, classic mode). service_side_encryption_enabled true without the encryption field being defined, etc.
There was a problem hiding this comment.
Test added for service_side_encryption_enabled false and the encryption filed with a user defined CMK.
This case is not allowed: service_side_encryption_enabled true without the encryption field being defined,
|
Hi @WodansSon , thank you for reviewing this. I have updated the code; could you please take another look? |
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |

Community Note
Description
azurerm_machine_learning_workspace- supportservice_side_encryption_enabledpropertyPR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Test can pass except two are not related in the PR

Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_machine_learning_workspace- supportservice_side_encryption_enabledproperty [GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #30177
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.