Skip to content

Commit

Permalink
chore(infra): update managed identity
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Feb 29, 2024
1 parent 4cd1d40 commit 6f314a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
7 changes: 0 additions & 7 deletions infra/core/security/managed-identity.bicep

This file was deleted.

27 changes: 2 additions & 25 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ var resourceToken = toLower(uniqueString(subscription().id, environmentName, loc
var tags = union({ 'azd-env-name': environmentName }, empty(aliasTag) ? {} : { alias: aliasTag })
var allowedOrigins = empty(allowedOrigin) ? [webApp.outputs.uri] : [webApp.outputs.uri, allowedOrigin]

var indexerApiIdentityName = '${abbrs.managedIdentityUserAssignedIdentities}indexer-api-${resourceToken}'
var searchApiIdentityName = '${abbrs.managedIdentityUserAssignedIdentities}search-api-${resourceToken}'

// Organize resources in a resource group
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: !empty(resourceGroupName) ? resourceGroupName : '${abbrs.resourcesResourceGroups}${environmentName}'
Expand Down Expand Up @@ -145,16 +142,6 @@ module webApp './core/host/staticwebapp.bicep' = {
}
}

// search API identity
module searchApiIdentity 'core/security/managed-identity.bicep' = {
name: 'search-api-identity'
scope: resourceGroup
params: {
name: searchApiIdentityName
location: location
}
}

// The search API
module searchApi './core/host/container-app.bicep' = {
name: 'search-api'
Expand All @@ -165,7 +152,7 @@ module searchApi './core/host/container-app.bicep' = {
tags: union(tags, { 'azd-service-name': searchApiName })
containerAppsEnvironmentName: containerApps.outputs.environmentName
containerRegistryName: containerApps.outputs.registryName
identityName: searchApiIdentityName
identityType: 'SystemAssigned'
allowedOrigins: allowedOrigins
containerCpuCoreCount: '1.0'
containerMemory: '2.0Gi'
Expand Down Expand Up @@ -222,16 +209,6 @@ module searchApi './core/host/container-app.bicep' = {
}
}

// Indexer API identity
module indexerApiIdentity 'core/security/managed-identity.bicep' = {
name: 'indexer-api-identity'
scope: resourceGroup
params: {
name: indexerApiIdentityName
location: location
}
}

// The indexer API
module indexerApi './core/host/container-app.bicep' = {
name: 'indexer-api'
Expand All @@ -242,7 +219,7 @@ module indexerApi './core/host/container-app.bicep' = {
tags: union(tags, { 'azd-service-name': indexerApiName })
containerAppsEnvironmentName: containerApps.outputs.environmentName
containerRegistryName: containerApps.outputs.registryName
identityName: indexerApiIdentityName
identityType: 'SystemAssigned'
containerCpuCoreCount: '1.0'
containerMemory: '2.0Gi'
secrets: [
Expand Down

0 comments on commit 6f314a6

Please sign in to comment.