-
Notifications
You must be signed in to change notification settings - Fork 495
fix: adding cmk to data disks #5903
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
base: main
Are you sure you want to change the base?
Conversation
Hi @Dylan-Prins thanks a lot for your contribution, before we approve it, please take a look to the static validation tests that are failing |
Yes, i was a little bit hastu with the PR. I will update the PR when the tests are successfull. |
ok, the tests are passed! I only have trouble setting up my key vault for passing the additional parameters. I have created a key vault and gave the app reg the permissions. following by adding the GitHub secret with the key vault name. Is there someone who can help me troubleshoot? |
Hi @Dylan-Prins , I cheked the last GH action and I saw that you're having the problem with the backup management service, did you check this requirement for the custom secrets? On the other hand, does the SPN you're using has permissions at key vault secret level? because on the actions error what I see is that it can't be retrieved |
@josunefon not going to merged, because of the tests? maybe someone can run them for me? |
Hey @Dylan-Prins, Anyways, it's a great contribution and should definitely go in. 🚀 We just have to make sure it works in one way or another before it hits main :) |
networkAccessPolicy: networkAccessPolicy | ||
encryption: { | ||
diskEncryptionSetId: dataDisk.managedDisk.?diskEncryptionSetResourceId | ||
type: 'EncryptionAtRestWithCustomerKey' |
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.
I guess this should rather be something akin to dataDisk.managedDisk.?type ?? 'EncryptionAtRestWithPlatformKey
'?
If defaulting to EncryptionAtRestWithCustomerKey
I guess you'd always need to provide a key.
diskMBpsReadWrite: dataDisk.?diskMBpsReadWrite | ||
publicNetworkAccess: publicNetworkAccess | ||
networkAccessPolicy: networkAccessPolicy | ||
encryption: { |
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.
I wonder if the entire property should be conditional / if the deployment works if no encryption is specified, yet the parameters are passed in as
encryption: {
diskEncryptionSetId: null
type: null
}
No need to change it now, it should just be tested. However in case it may fail we'd need to change it to e.g.
encryption: !empty(dataDisk.managedDisk.?diskEncryptionSetResourceId) ? {
diskEncryptionSetId: dataDisk.managedDisk.?diskEncryptionSetResourceId
type: dataDisk.managedDisk.?type
} : null
or
...(!empty(dataDisk.managedDisk.?diskEncryptionSetResourceId) ? { encryption: {
diskEncryptionSetId: dataDisk.managedDisk.?diskEncryptionSetResourceId
type: dataDisk.managedDisk.?type
} : {})
UNLESS, the resource type anyways defaults to
encryption: {
diskEncryptionSetId: null
type: 'EncryptionAtRestWithPlatformKey'
}
i.e., MS-managed encryption. In that case, the default for type
should just be EncryptionAtRestWithPlatformKey
and you're good to go
Description
CMK was not added to the Data disks, while the parameter was there.
Pipeline Reference
Type of Change
version.json
:version.json
.version.json
.Checklist
Set-AVMModule
locally to generate the supporting module files.