agent-openai-banking-assistant-csharp icon indicating copy to clipboard operation
agent-openai-banking-assistant-csharp copied to clipboard

it is not provisioning

Open gkarwchan opened this issue 5 months ago • 2 comments

When I run azd up, I got error.

What I did to run azd up?

  1. I created azd environment called "dev",
  2. I created a file ".env.dev", which is the same structure as main.paramters.json.
  3. I put the file in the root folder of the application.
  4. I am an owner for my pay-as-you-go subscription on Azure.
  5. I proparley logged in using azd auth login
  6. when I run : azd auth login --check-status, I got the valid email

I have the following version:

Bicep CLI version 0.36.1 (a727ed087a) azd version 1.17.2 (commit c241503424c35882c04d9a909ff9bb1469cd68c8)

When I run azd up

I got the following error:

ERROR: error executing step command 'provision': initializing provisioning manager: failed to compile bicep template: failed running bicep build: exit code: 1, stdout: , stderr: /home/ghass/code/banking/infra/shared/ai/cognitiveservices.bicep(45,20) : Warning use-safe-access: Use the safe access (.?) operator. [https://aka.ms/bicep/linter/use-safe-access] /home/ghass/code/banking/infra/shared/ai/cognitiveservices.bicep(47,8) : Warning use-safe-access: Use the safe access (.?) operator. [https://aka.ms/bicep/linter/use-safe-access] /home/ghass/code/banking/infra/shared/host/container-app.bicep(129,16) : Warning use-secure-value-for-secure-inputs: Property 'value' expects a secure value, but the value provided may not be secure. [https://aka.ms/bicep/linter/use-secure-value-for-secure-inputs] /home/ghass/code/banking/infra/shared/host/container-apps.bicep(28,10) : Error BCP420: The scope could not be resolved at compile time because the supplied expression is ambiguous or too complex. Scoping expressions must be reducible to a specific kind of scope without knowledge of parameter values. [https://aka.ms/bicep/core-diagnostics#BCP420] /home/ghass/code/banking/infra/shared/storage/storage-account.bicep(65,23) : Warning use-safe-access: Use the safe access (.?) operator. [https://aka.ms/bicep/linter/use-safe-access] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(37,15) : Warning BCP037: The property "asset" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(41,15) : Warning BCP037: The property "defaultMenuItemId" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(68,15) : Warning BCP037: The property "asset" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(72,15) : Warning BCP037: The property "defaultMenuItemId" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(99,15) : Warning BCP037: The property "asset" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(140,15) : Warning BCP037: The property "asset" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(181,15) : Warning BCP037: The property "asset" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(239,15) : Warning BCP037: The property "asset" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(301,15) : Warning BCP037: The property "isAdapter" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(302,15) : Warning BCP037: The property "asset" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(306,15) : Warning BCP037: The property "defaultMenuItemId" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(365,15) : Warning BCP037: The property "isAdapter" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(366,15) : Warning BCP037: The property "asset" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(370,15) : Warning BCP037: The property "defaultMenuItemId" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(456,15) : Warning BCP037: The property "asset" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/shared/monitor/applicationinsights-dashboard.bicep(460,15) : Warning BCP037: The property "defaultMenuItemId" is not allowed on objects of type "Extension/HubsExtension/PartType/MarkdownPart". Permissible properties include "settings". If this is a resource type definition inaccuracy, report it using https://aka.ms/bicep-type-issues. [https://aka.ms/bicep/core-diagnostics#BCP037] /home/ghass/code/banking/infra/main.bicep(61,7) : Warning no-unused-params: Parameter "openAiDeploymentCapacity" is declared but never used. [https://aka.ms/bicep/linter/no-unused-params] /home/ghass/code/banking/infra/main.bicep(94,47) : Warning prefer-unquoted-property-names: Property names that are valid identifiers should be declared without quotation marks and accessed using dot notation. [https://aka.ms/bicep/linter/prefer-unquoted-property-names] /home/ghass/code/banking/infra/main.bicep(130,22) : Error BCP104: The referenced module has errors. [https://aka.ms/bicep/core-diagnostics#BCP104]

gkarwchan avatar Jun 29 '25 04:06 gkarwchan

Hi, I've fixed the deployment issue by updating infra\shared\host\container-apps.bicep

from (existing):

module containerRegistry 'container-registry.bicep' = {
  name: '${name}-container-registry'
  scope: !empty(containerRegistryResourceGroupName) ? resourceGroup(containerRegistryResourceGroupName) : resourceGroup()
  params: {
    name: containerRegistryName
    location: location
    adminUserEnabled: containerRegistryAdminUserEnabled
    tags: tags
  }
}

TO (UPDATED):

var targetContainerRegistryResourceGroupName = !empty(containerRegistryResourceGroupName) ? containerRegistryResourceGroupName : resourceGroup().name

resource targetContainerRegistryResourceGroup 'Microsoft.Resources/resourceGroups@2022-09-01' existing = {
  scope: subscription()
  name: targetContainerRegistryResourceGroupName
}

module containerRegistry 'container-registry.bicep' = {
  name: '${name}-container-registry'
  scope: targetContainerRegistryResourceGroup
  params: {
    name: containerRegistryName
    location: location
    adminUserEnabled: containerRegistryAdminUserEnabled
    tags: tags
  }
}

I hope that would help

mohamedsaif avatar Aug 12 '25 06:08 mohamedsaif

@gkarwchan was @mohamedsaif suggestion able to fix your issue? Then I'd suggest to open up a PR.

dminkovski avatar Sep 09 '25 08:09 dminkovski