From 6322ba218d17d702b45dd0379a066fffa7d6df3d Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Boll Date: Tue, 5 Nov 2024 10:14:02 +0100 Subject: [PATCH] Private endpoint should actually be in the cluster RG --- .../templates/mgmt-cluster.bicep | 1 - .../templates/svc-cluster.bicep | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/dev-infrastructure/templates/mgmt-cluster.bicep b/dev-infrastructure/templates/mgmt-cluster.bicep index 0660414394..5a44e69b63 100644 --- a/dev-infrastructure/templates/mgmt-cluster.bicep +++ b/dev-infrastructure/templates/mgmt-cluster.bicep @@ -184,7 +184,6 @@ resource eventGridNamespace 'Microsoft.EventGrid/namespaces@2024-06-01-preview' module eventGrindPrivateEndpoint '../modules/private-endpoint.bicep' = { name: 'eventGridPrivateEndpoint' - scope: resourceGroup(regionalResourceGroup) params: { location: location serviceType: 'eventgrid' diff --git a/dev-infrastructure/templates/svc-cluster.bicep b/dev-infrastructure/templates/svc-cluster.bicep index 86a246e54c..d73fa4f192 100644 --- a/dev-infrastructure/templates/svc-cluster.bicep +++ b/dev-infrastructure/templates/svc-cluster.bicep @@ -394,3 +394,25 @@ module oidc '../modules/oidc/main.bicep' = { svcCluster ] } + +// +// E V E N T G R I D P R I V A T E E N D P O I N T C O N N E C T I O N +// + +resource eventGridNamespace 'Microsoft.EventGrid/namespaces@2024-06-01-preview' existing = { + name: maestroEventGridNamespacesName + scope: resourceGroup(regionalResourceGroup) +} + +module eventGrindPrivateEndpoint '../modules/private-endpoint.bicep' = { + name: 'eventGridPrivateEndpoint' + params: { + location: location + serviceType: 'eventgrid' + subnetIds: [svcCluster.outputs.aksNodeSubnetId] + privateLinkServiceId: eventGridNamespace.id + groupIds: ['topicspace'] + privateEndpointDnsZoneName: 'privatelink.ts.eventgrid.azure.net' + vnetId: svcCluster.outputs.aksVnetId + } +}