Skip to content

Commit fd4d917

Browse files
fieat: Updated the power shell script
1 parent e86deb7 commit fd4d917

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

Deployment/resourcedeployment.ps1

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) Microsoft Corporation.
1+
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT license.
33

44
#https://patorjk.com/software/taag
@@ -346,23 +346,18 @@ class DeploymentResult {
346346

347347
}
348348

349-
[hashtable]GetAzdEnvValues() {
350-
$envVars = @{}
349+
[void]MapResult() {
351350

351+
$envValues = @{}
352352
azd env get-values | ForEach-Object {
353353
if ($_ -match "^\s*([^#][^=]+?)\s*=\s*(.+)\s*$") {
354354
$key = $matches[1].Trim()
355355
$value = $matches[2].Trim()
356-
$envVars[$key] = $value
356+
$envValues[$key] = $value.Trim('\"')
357357
}
358358
}
359359

360-
return $envVars
361-
}
362-
363-
[void]MapResult() {
364-
365-
$envValues = Get-AzdEnvValues
360+
# $envValues = Get-AzdEnvValues
366361
$this.TenantId = $envValues["AZURE_TENANT_ID"]
367362
$this.SubscriptionId = $envValues["AZURE_SUBSCRIPTION_ID"]
368363

@@ -445,9 +440,9 @@ try {
445440
# Map the deployment result to DeploymentResult object
446441
$deploymentResult.MapResult()
447442
# Display the deployment result
448-
DisplayResult(deploymentResult)
443+
DisplayResult($deploymentResult)
449444

450-
LoginAzure($deploymentResult.TenantId, $deploymentResult.SubscriptionId)
445+
LoginAzure $deploymentResult.TenantId $deploymentResult.SubscriptionId
451446

452447
###############################################################
453448
# Step 2 : Get Secrets from Azure resources

infra/main.bicep

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags =
4848
param enableTelemetry bool = true
4949

5050
@description('Optional. Enable private networking for applicable resources, aligned with the WAF recommendations. Defaults to false.')
51-
param enablePrivateNetworking bool = true
51+
param enablePrivateNetworking bool = false
5252

5353
@description('Optional: Existing Log Analytics Workspace Resource ID')
5454
param existingLogAnalyticsWorkspaceId string = ''
@@ -326,7 +326,7 @@ module avmContainerRegistry './modules/container-registry.bicep' = {
326326

327327
// ========== Cosmos Database for Mongo DB ========== //
328328
module avmCosmosDB 'br/public:avm/res/document-db/database-account:0.15.0' = {
329-
name: 'cosmos-${solutionSuffix}'
329+
name: take('avm.res.cosmos-${solutionSuffix}', 64)
330330
params: {
331331
name: 'cosmos-${solutionSuffix}'
332332
location: solutionLocation
@@ -382,7 +382,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
382382
name: take('avm.res.app-configuration.configuration-store.${appConfigName}', 64)
383383
params: {
384384
name: appConfigName
385-
location: location
385+
location: solutionLocation
386386
managedIdentities: { systemAssigned: true }
387387
sku: 'Standard'
388388
enableTelemetry: enableTelemetry
@@ -672,6 +672,7 @@ module managedCluster 'br/public:avm/res/container-service/managed-cluster:0.10.
672672
dnsPrefix: 'aks-${solutionSuffix}'
673673
enableRBAC: true
674674
disableLocalAccounts: false
675+
publicNetworkAccess: 'Enabled'
675676
managedIdentities: {
676677
systemAssigned: true
677678
// userAssignedResourceIds: [

0 commit comments

Comments
 (0)