-
Notifications
You must be signed in to change notification settings - Fork 843
Expand file tree
/
Copy pathAzureContainerAppEnvironmentExtensionsTests.WithDelegatedSubnet_ConfiguresVnetConfiguration.verified.bicep
More file actions
89 lines (71 loc) · 2.6 KB
/
AzureContainerAppEnvironmentExtensionsTests.WithDelegatedSubnet_ConfiguresVnetConfiguration.verified.bicep
File metadata and controls
89 lines (71 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
@description('The location for the resource(s) to be deployed.')
param location string = resourceGroup().location
param userPrincipalId string = ''
param tags object = { }
param env_acr_outputs_name string
param myvnet_outputs_container_apps_subnet_id string
resource env_mi 'Microsoft.ManagedIdentity/userAssignedIdentities@2024-11-30' = {
name: take('env_mi-${uniqueString(resourceGroup().id)}', 128)
location: location
tags: tags
}
resource env_acr 'Microsoft.ContainerRegistry/registries@2025-04-01' existing = {
name: env_acr_outputs_name
}
resource env_acr_env_mi_AcrPull 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(env_acr.id, env_mi.id, subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7f951dda-4ed3-4680-a7ca-43fe172d538d'))
properties: {
principalId: env_mi.properties.principalId
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7f951dda-4ed3-4680-a7ca-43fe172d538d')
principalType: 'ServicePrincipal'
}
scope: env_acr
}
resource env_law 'Microsoft.OperationalInsights/workspaces@2025-02-01' = {
name: take('envlaw-${uniqueString(resourceGroup().id)}', 63)
location: location
properties: {
sku: {
name: 'PerGB2018'
}
}
tags: tags
}
resource env 'Microsoft.App/managedEnvironments@2025-07-01' = {
name: take('env${uniqueString(resourceGroup().id)}', 24)
location: location
properties: {
appLogsConfiguration: {
destination: 'log-analytics'
logAnalyticsConfiguration: {
customerId: env_law.properties.customerId
sharedKey: env_law.listKeys().primarySharedKey
}
}
vnetConfiguration: {
infrastructureSubnetId: myvnet_outputs_container_apps_subnet_id
}
workloadProfiles: [
{
name: 'consumption'
workloadProfileType: 'Consumption'
}
]
}
tags: tags
}
resource aspireDashboard 'Microsoft.App/managedEnvironments/dotNetComponents@2025-10-02-preview' = {
name: 'aspire-dashboard'
properties: {
componentType: 'AspireDashboard'
}
parent: env
}
output AZURE_LOG_ANALYTICS_WORKSPACE_NAME string = env_law.name
output AZURE_LOG_ANALYTICS_WORKSPACE_ID string = env_law.id
output AZURE_CONTAINER_REGISTRY_NAME string = env_acr.name
output AZURE_CONTAINER_REGISTRY_ENDPOINT string = env_acr.properties.loginServer
output AZURE_CONTAINER_REGISTRY_MANAGED_IDENTITY_ID string = env_mi.id
output AZURE_CONTAINER_APPS_ENVIRONMENT_NAME string = env.name
output AZURE_CONTAINER_APPS_ENVIRONMENT_ID string = env.id
output AZURE_CONTAINER_APPS_ENVIRONMENT_DEFAULT_DOMAIN string = env.properties.defaultDomain