Skip to content

Commit 11fb1ab

Browse files
authored
Merge pull request #33 from reneenoble/keyvault_fix2
Force KeyVault firewall security
2 parents e55ff37 + a15d657 commit 11fb1ab

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.cruft.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/Azure-Samples/Azure-Python-Standardization-Template-Generator",
3-
"commit": "f9a5fdc99895df6e7f4844a19cb000ec8eb23bca",
3+
"commit": "071985944385a0faa5d5510469b94eac92339d1f",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {

infra/core/security/keyvault.bicep

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,26 @@ param tags object = {}
55

66
param principalId string = ''
77

8+
@description('List of IP addresses or IP address ranges in CIDR format that are allowed to access the key vault.')
9+
param ipRules array = []
10+
11+
// Allow all Azure services to bypass Key Vault network rules
12+
param allowAzureServicesAccess bool = true
13+
814
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
915
name: name
1016
location: location
1117
tags: tags
1218
properties: {
1319
tenantId: subscription().tenantId
1420
sku: { family: 'A', name: 'standard' }
21+
networkAcls: {
22+
bypass: allowAzureServicesAccess ? 'AzureServices' : 'None'
23+
defaultAction: 'Deny'
24+
ipRules: ipRules
25+
virtualNetworkRules: []
26+
}
27+
enableRbacAuthorization: true
1528
accessPolicies: !empty(principalId) ? [
1629
{
1730
objectId: principalId

0 commit comments

Comments
 (0)