Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions infra/modules/shared/container-registry.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ resource containerRegistry 'Microsoft.ContainerRegistry/registries@2026-01-01-pr
name: 'Premium'
}
properties: {
encryption: {
status: 'disabled'
}
endpointProtocol: 'IPv4'
regionalEndpoints: 'Disabled'
roleAssignmentMode: 'LegacyRegistryPermissions'
Comment thread
tomhawkin marked this conversation as resolved.
Resolved
dataEndpointEnabled: true
publicNetworkAccess: 'Disabled'
// Allow ACR Tasks (az acr build) to push through the network rules.
Expand Down
12 changes: 11 additions & 1 deletion infra/modules/shared/egress-firewall.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ resource firewallSubnet 'Microsoft.Network/virtualNetworks/subnets@2024-05-01' =
name: 'AzureFirewallSubnet'
properties: {
addressPrefix: firewallSubnetAddressPrefix
privateEndpointNetworkPolicies: 'Enabled'
}
}

Expand All @@ -188,6 +189,7 @@ resource firewallManagementSubnet 'Microsoft.Network/virtualNetworks/subnets@202
name: 'AzureFirewallManagementSubnet'
properties: {
addressPrefix: firewallManagementSubnetAddressPrefix
privateEndpointNetworkPolicies: 'Enabled'
}
}

Expand All @@ -196,11 +198,15 @@ resource publicIP 'Microsoft.Network/publicIPAddresses@2023-06-01' = {
location: location
sku: {
name: 'Standard'
tier: 'Regional'
}
tags: tags
properties: {
publicIPAllocationMethod: 'Static'
publicIPAddressVersion: 'IPv4'
ddosSettings:{
protectionMode: 'VirtualNetworkInherited'
}
}
}

Expand All @@ -209,11 +215,15 @@ resource managementPublicIP 'Microsoft.Network/publicIPAddresses@2023-06-01' = {
location: location
sku: {
name: 'Standard'
tier: 'Regional'
}
tags: tags
properties: {
publicIPAllocationMethod: 'Static'
publicIPAddressVersion: 'IPv4'
ddosSettings:{
protectionMode: 'VirtualNetworkInherited'
}
}
}

Expand Down Expand Up @@ -269,7 +279,7 @@ resource firewall 'Microsoft.Network/azureFirewalls@2024-05-01' = {
}
}

resource applicationRuleCollectionGroup 'Microsoft.Network/firewallPolicies/ruleCollectionGroups@2022-01-01' = {
resource applicationRuleCollectionGroup 'Microsoft.Network/firewallPolicies/ruleCollectionGroups@2026-01-01' = {
parent: firewallPolicy
name: 'DefaultApplicationRuleCollectionGroup'
properties: {
Expand Down
2 changes: 2 additions & 0 deletions infra/modules/shared/observability.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10
sku: {
name: 'PerGB2018'
}
retentionInDays: 30
}
}

Expand Down Expand Up @@ -58,6 +59,7 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
Application_Type: 'web'
Flow_Type: 'Bluefield'
WorkspaceResourceId: logAnalyticsWorkspace.id
Request_Source: 'rest'
}
}

Expand Down
59 changes: 35 additions & 24 deletions infra/stacks/api-batch-processor/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,6 @@ module secrets '../../modules/shared/secrets.bicep' = {
}
}

module keyVaultPrivateEndpoint '../../modules/shared/key-vault-private-endpoint.bicep' = {
name: 'secrets-private-endpoint'
params: {
location: location
tags: tags
keyVaultName: secrets.outputs.name
peSubnetId: containerAppNetwork.outputs.privateEndpointSubnetId
vnetId: containerAppNetwork.outputs.virtualNetworkId
}
}

module egressFirewall '../../modules/shared/egress-firewall.bicep' = {
name: 'egress-firewall'
params: {
Expand Down Expand Up @@ -205,6 +194,27 @@ module containerAppNetwork '../../modules/shared/container-app-network.bicep' =
tags: tags
}
}
module keyVaultPrivateEndpoint '../../modules/shared/key-vault-private-endpoint.bicep' = {
name: 'secrets-private-endpoint'
params: {
location: location
tags: tags
keyVaultName: secrets.outputs.name
peSubnetId: containerAppNetwork.outputs.privateEndpointSubnetId
vnetId: containerAppNetwork.outputs.virtualNetworkId
}
}

module acrPrivateEndpoint '../../modules/shared/acr-private-endpoint.bicep' = {
Comment thread
tomhawkin marked this conversation as resolved.
Resolved
name: 'acr-private-endpoint'
params: {
location: location
tags: tags
registryName: containerRegistry.outputs.name
peSubnetId: containerAppNetwork.outputs.privateEndpointSubnetId
vnetId: containerAppNetwork.outputs.virtualNetworkId
}
}

module caeFirewallPeering '../../modules/shared/virtual-network-peering.bicep' = {
name: 'cae-firewall-peering'
Expand Down Expand Up @@ -234,6 +244,7 @@ module containerAppEnvironment '../../modules/shared/container-app-environment.b
}
dependsOn: [
caeFirewallPeering
acrPrivateEndpoint
]
}

Expand Down Expand Up @@ -288,6 +299,19 @@ module matchingApi '../../modules/api-apps/matching-api.bicep' = {
}
}

module pdsEmulator '../../modules/api-apps/pds-emulator.bicep' = if (usePdsEmulator) {
name: 'pds-emulator'
params: {
location: location
containerAppsEnvironmentId: containerAppEnvironment.outputs.id
containerRegistryServer: containerRegistry.outputs.endpoint
managedIdentityId: identity.outputs.id
environmentName: environmentName
imageTag: pdsEmulatorImageTag
tags: tags
}
}

module externalApi '../../modules/api-apps/external-api.bicep' = {
name: 'external-api'
params: {
Expand All @@ -313,19 +337,6 @@ module externalApi '../../modules/api-apps/external-api.bicep' = {
]
}

module pdsEmulator '../../modules/api-apps/pds-emulator.bicep' = if (usePdsEmulator) {
name: 'pds-emulator'
params: {
location: location
containerAppsEnvironmentId: containerAppEnvironment.outputs.id
containerRegistryServer: containerRegistry.outputs.endpoint
managedIdentityId: identity.outputs.id
environmentName: environmentName
imageTag: pdsEmulatorImageTag
tags: tags
}
}

module graphqlProcessJob '../../modules/api-batch-processor/graphql-process-job.bicep' = {
name: 'api-batch-processor-graphql-process-job'
params: {
Expand Down
Loading