Skip to content

Commit

Permalink
Replace dedicated endpoint module with standardized one
Browse files Browse the repository at this point in the history
  • Loading branch information
janboll committed Nov 14, 2024
1 parent 3bf5906 commit d9bd6c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 81 deletions.

This file was deleted.

5 changes: 5 additions & 0 deletions dev-infrastructure/modules/private-endpoint.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ param location string
@description('The service type the private endpoint is created for')
@allowed([
'eventgrid'
'keyvault'
])
param serviceType string

@description('The group id of the private endpoint service')
@allowed([
'topicspace'
'vault'
])
param groupId string

Expand All @@ -25,6 +27,9 @@ var endpointConfig = {
eventgrid: {
topicspace: 'privatelink.ts.eventgrid.azure.net'
}
keyvault: {
vault: 'privatelink.vaultcore.azure.net'
}
}

resource eventGridPrivateEndpointDnsZone 'Microsoft.Network/privateDnsZones@2020-06-01' = {
Expand Down
9 changes: 5 additions & 4 deletions dev-infrastructure/templates/svc-cluster.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,15 @@ module serviceKeyVault '../modules/keyvault/keyvault.bicep' = {

output svcKeyVaultName string = serviceKeyVault.outputs.kvName

module serviceKeyVaultPrivateEndpoint '../modules/keyvault/keyvault-private-endpoint.bicep' = {
module serviceKeyVaultPrivateEndpoint '../modules/private-endpoint.bicep' = {
name: '${deployment().name}-svcs-kv-pe'
params: {
location: location
keyVaultName: serviceKeyVaultName
subnetId: svcCluster.outputs.aksNodeSubnetId
subnetIds: [svcCluster.outputs.aksNodeSubnetId]
vnetId: svcCluster.outputs.aksVnetId
keyVaultId: serviceKeyVault.outputs.kvId
privateLinkServiceId: serviceKeyVault.outputs.kvId
serviceType: 'keyvault'
groupId: 'vault'
}
}

Expand Down

0 comments on commit d9bd6c2

Please sign in to comment.