-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkey-vault.bicep
36 lines (34 loc) · 1.07 KB
/
key-vault.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
param location string
param keyVaultName string
param acrName string
param keyVaultSecretNameACRUsername string ='acr-username'
param keyVaultSecretNameACRPassword1 string ='acr-password1'
module keyvault './Ressources/ResourceModules-main 3/modules/key-vault/vault/main.bicep' = {
name: keyVaultName
params: {
name: keyVaultName
location: location
enableVaultForDeployment: true
roleAssignments: [
{
principalId: '7200f83e-ec45-4915-8c52-fb94147cfe5a'
roleDefinitionIdOrName: 'Key Vault Secrets User'
principalType: 'ServicePrincipal'
}
]
}
}
module acr './Ressources/ResourceModules-main 3/modules/container-registry/registry/main.bicep' = {
name: acrName
dependsOn: [
keyvault
]
params: {
name: acrName
location: location
acrAdminUserEnabled: true
adminCredentialsKeyVaultResourceId: resourceId('Microsoft.KeyVault/vaults', keyVaultName)
adminCredentialsKeyVaultSecretUserName: keyVaultSecretNameACRUsername
adminCredentialsKeyVaultSecretUserPassword1: keyVaultSecretNameACRPassword1
}
}