Skip to content

Commit 892ca7f

Browse files
committed
update bicep for keyvault
1 parent 092b30a commit 892ca7f

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

infra/main.bicep

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ module bicepOwnerRoleAssignment 'modules/role_assignment.bicep' = {
123123
module avmKeyVault './modules/key-vault.bicep' = {
124124
name: format(deployment_param.resource_name_format_string, abbrs.security.keyVault)
125125
params: {
126-
name: format(deployment_param.resource_name_format_string, abbrs.security.keyVault)
127126
keyVaultParams: {
128-
name: '${abbrs.security.keyVault}${deployment_param.solution_prefix}'
127+
keyvaultName: '${abbrs.security.keyVault}${deployment_param.solution_prefix}'
129128
location: deployment_param.resource_group_location
130129
tags: {
131130
app: deployment_param.solution_prefix

infra/modules/key-vault.bicep

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ metadata name = 'Key Vault Module'
1717

1818
import {
1919
key_vault_param_type
20+
default_deployment_param_type
2021
} from './types.bicep'
2122

2223
param keyVaultParams key_vault_param_type
23-
param name string
24-
24+
param deployment_param default_deployment_param_type
2525
module avmKeyVault 'br/public:avm/res/key-vault/vault:0.12.1' = {
26-
name: name
26+
name: 'deploy_keyvault'
2727
params: {
28-
name: keyVaultParams.name
28+
name: keyVaultParams.keyvaultName
2929
location: keyVaultParams.location
3030
tags: keyVaultParams.tags
3131
roleAssignments: keyVaultParams.roleAssignments
@@ -42,5 +42,7 @@ module avmKeyVault 'br/public:avm/res/key-vault/vault:0.12.1' = {
4242
}
4343
}
4444

45+
// Adding additional resource deployment for WAF enabled
46+
4547
output resourceId string = avmKeyVault.outputs.resourceId
4648
output vaultUri string = avmKeyVault.outputs.uri

infra/modules/types.bicep

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ type container_app_deployment_info_type = {
6565
@export()
6666
func make_solution_prefix(unique_id string) string => 'cps-${padLeft(take(unique_id, 12), 12, '0')}'
6767

68-
type keyvault_sku_type = 'standard' | 'premium'
68+
type keyvault_sku_type = 'standard' | 'premium'
6969

70-
type keyvault_public_network_access_type = 'Disabled' | 'Enabled'
70+
type keyvault_public_network_access_type = 'Disabled' | 'Enabled'
7171

72-
@export()
72+
@export()
7373
type key_vault_param_type = {
7474
@description('Name of the Key Vault')
75-
name: string
75+
keyvaultName: string
7676
@description('Location of the Key Vault')
7777
location: string
7878
@description('Tags for the Key Vault')

0 commit comments

Comments
 (0)