Skip to content

Commit

Permalink
remove environment name
Browse files Browse the repository at this point in the history
  • Loading branch information
luxu-ms committed Apr 26, 2024
1 parent 999925b commit 0f82cfa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
13 changes: 1 addition & 12 deletions Environments/Todo-Mongo-AKS-LA/main.bicep
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
@minLength(1)
@maxLength(64)
@description('Name of the the environment which is used to generate a short unique hash used in all resources.')
param environmentName string

@minLength(1)
@description('Primary location for all resources')
param location string = resourceGroup().location
Expand All @@ -17,16 +12,14 @@ param sharedAKSEnvironmentName string
var sharedAKSResourceGroup = '${sharedAKSProjectName}-${sharedAKSEnvironmentName}'

var abbrs = loadJsonContent('./abbreviations.json')
var resourceToken = toLower(uniqueString(subscription().id, environmentName, location))
var tags = { 'azd-env-name': environmentName }
var resourceToken = toLower(uniqueString(subscription().id, resourceGroup().id, location))

// Store secrets in a keyvault
module keyVault './core/security/keyvault.bicep' = {
name: 'keyvault'
params: {
name: !empty(keyVaultName) ? keyVaultName : '${abbrs.keyVaultVaults}${resourceToken}'
location: location
tags: tags
principalId: principalId
}
}
Expand Down Expand Up @@ -64,7 +57,6 @@ module cosmos './app/db.bicep' = {
accountName: !empty(cosmosAccountName) ? cosmosAccountName : '${abbrs.documentDBDatabaseAccounts}${resourceToken}'
databaseName: cosmosDatabaseName
location: location
tags: tags
keyVaultName: keyVault.outputs.name
}
}
Expand All @@ -87,7 +79,6 @@ resource configStoreKeyValue 'Microsoft.AppConfiguration/configurationStores/key
properties: {
value: cosmos.outputs.connectionStringKey
contentType: contentType
tags: tags
}
}

Expand All @@ -97,7 +88,6 @@ resource configStoreKeyValue2 'Microsoft.AppConfiguration/configurationStores/ke
properties: {
value: cosmos.outputs.databaseName
contentType: contentType
tags: tags
}
}

Expand All @@ -107,7 +97,6 @@ resource configStoreKeyValue3 'Microsoft.AppConfiguration/configurationStores/ke
properties: {
value: keyVault.outputs.endpoint
contentType: contentType
tags: tags
}
}

Expand Down
6 changes: 0 additions & 6 deletions Environments/Todo-Mongo-AKS-LA/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ runner: ARM
templatePath: azuredeploy.json

parameters:
- id: "environmentName"
name: "Environment Name (e.g. testenv)"
description: "Name of the Environment"
type: string
required: true

- id: "location"
name: "Region (e.g. eastus)"
description: "Location of the resources"
Expand Down

0 comments on commit 0f82cfa

Please sign in to comment.