File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -155,15 +155,15 @@ resource keyVaultSecretsUserAssignment 'Microsoft.Authorization/roleAssignments@
155155 }
156156}
157157
158- resource containerRegistry 'Microsoft.ContainerRegistry/registries@2021-09-01' existing = {
158+ resource containerRegistry 'Microsoft.ContainerRegistry/registries@2021-09-01' existing = if ( useLocalBuild == 'true' ) {
159159 name : acrName
160160}
161161
162- resource AcrPull 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
162+ resource AcrPull 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = if ( useLocalBuild == 'true' ) {
163163 name : '7f951dda-4ed3-4680-a7ca-43fe172d538d'
164164}
165165
166- resource acrPullRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
166+ resource acrPullRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = if ( useLocalBuild == 'true' ) {
167167 name : guid (appService .name , AcrPull .id )
168168 scope : containerRegistry
169169 properties : {
Original file line number Diff line number Diff line change @@ -30,15 +30,15 @@ module appService 'deploy_app_service.bicep' = {
3030 }
3131}
3232
33- resource containerRegistry 'Microsoft.ContainerRegistry/registries@2021-09-01' existing = {
33+ resource containerRegistry 'Microsoft.ContainerRegistry/registries@2021-09-01' existing = if ( useLocalBuild == 'true' ) {
3434 name : acrName
3535}
3636
37- resource AcrPull 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = {
37+ resource AcrPull 'Microsoft.Authorization/roleDefinitions@2022-04-01' existing = if ( useLocalBuild == 'true' ) {
3838 name : '7f951dda-4ed3-4680-a7ca-43fe172d538d'
3939}
4040
41- resource acrPullRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
41+ resource acrPullRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = if ( useLocalBuild == 'true' ) {
4242 name : guid (appService .name , AcrPull .id )
4343 scope : containerRegistry
4444 properties : {
Original file line number Diff line number Diff line change 55 "_generator" : {
66 "name" : " bicep" ,
77 "version" : " 0.36.1.42791" ,
8- "templateHash" : " 13316946518810732992 "
8+ "templateHash" : " 3001611551215986671 "
99 }
1010 },
1111 "parameters" : {
27972797 "_generator" : {
27982798 "name" : " bicep" ,
27992799 "version" : " 0.36.1.42791" ,
2800- "templateHash" : " 3016771873556172389 "
2800+ "templateHash" : " 8556329617743538291 "
28012801 }
28022802 },
28032803 "parameters" : {
28872887 ]
28882888 },
28892889 {
2890+ "condition" : " [equals(parameters('useLocalBuild'), 'true')]" ,
28902891 "type" : " Microsoft.Authorization/roleAssignments" ,
28912892 "apiVersion" : " 2022-04-01" ,
28922893 "scope" : " [format('Microsoft.ContainerRegistry/registries/{0}', parameters('acrName'))]" ,
31803181 "_generator" : {
31813182 "name" : " bicep" ,
31823183 "version" : " 0.36.1.42791" ,
3183- "templateHash" : " 2533491669662748886 "
3184+ "templateHash" : " 14303739685044053977 "
31843185 }
31853186 },
31863187 "parameters" : {
32183219 },
32193220 "resources" : [
32203221 {
3222+ "condition" : " [equals(parameters('useLocalBuild'), 'true')]" ,
32213223 "type" : " Microsoft.Authorization/roleAssignments" ,
32223224 "apiVersion" : " 2022-04-01" ,
32233225 "scope" : " [format('Microsoft.ContainerRegistry/registries/{0}', parameters('acrName'))]" ,
You can’t perform that action at this time.
0 commit comments