forked from Azure/missionlz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved CMK resources to HUB (Azure#842)
commit
- Loading branch information
Showing
3 changed files
with
99 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
Copyright (c) Microsoft Corporation. | ||
Licensed under the MIT License. | ||
*/ | ||
|
||
param diskEncryptionSetName string | ||
param deploymentNameSuffix string | ||
param keyVaultName string | ||
param keyVaultPrivateDnsZoneResourceId string | ||
param location string | ||
param resourcePrefix string | ||
param subnetResourceId string | ||
param tags object | ||
param userAssignedIdentityName string | ||
|
||
module keyVault '../modules/key-vault.bicep' = { | ||
name: 'deploy-key-vault-${deploymentNameSuffix}' | ||
params: { | ||
keyVaultName: keyVaultName | ||
keyVaultPrivateDnsZoneResourceId: keyVaultPrivateDnsZoneResourceId | ||
location: location | ||
resourcePrefix: resourcePrefix | ||
subnetResourceId: subnetResourceId | ||
tags: tags | ||
} | ||
} | ||
|
||
module diskEncryptionSet '../modules/disk-encryption-set.bicep' = { | ||
name: 'deploy-disk-encryption-set_${deploymentNameSuffix}' | ||
params: { | ||
deploymentNameSuffix: deploymentNameSuffix | ||
diskEncryptionSetName: diskEncryptionSetName | ||
keyUrl: keyVault.outputs.keyUriWithVersion | ||
keyVaultResourceId: keyVault.outputs.keyVaultResourceId | ||
location: location | ||
tags: contains(tags, 'Microsoft.Compute/diskEncryptionSets') ? tags['Microsoft.Compute/diskEncryptionSets'] : {} | ||
} | ||
} | ||
|
||
module userAssignedIdentity '../modules/user-assigned-identity.bicep' = { | ||
name: 'deploy-user-assigned-identity-${deploymentNameSuffix}' | ||
params: { | ||
location: location | ||
name: userAssignedIdentityName | ||
tags: tags | ||
} | ||
} | ||
|
||
output diskEncryptionSetResourceId string = diskEncryptionSet.outputs.resourceId | ||
output keyVaultUri string = keyVault.outputs.keyVaultUri | ||
output storageKeyName string = keyVault.outputs.storageKeyName | ||
output userAssignedIdentityResourceId string = userAssignedIdentity.outputs.resourceId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.