Azure-Samples / contoso-real-estate

Intelligent enterprise-grade reference architecture for JavaScript, featuring OpenAI integration, Azure Developer CLI template and Playwright tests.
MIT License
889 stars 528 forks source link

[Chore] - azd provision fails for Azure Database for PostgreSQL flexible server #385

Closed diberry closed 1 year ago

diberry commented 1 year ago

Are you accessing the project from the GitHub Codespaces?

Note: The project is optimized to run on Codespaces. We welcome contributions to enhance it for cross-platform local development, but it's not something we will prioritize right now. Thank you!

Describe the bug Provision fails with error with little information about how to fix it. I'm not sure if version refers to the API for Bicep which using latest since it isn't specified. Then for version of the Db, it is using 13 as shows in this bicep file. If the database for the CMS and portal didn't complete provisioning, it seems like the provisioning for CMS and Portal should also fail.

To Reproduce Steps to reproduce the behavior:

  1. Azd auth login
  2. Azd provision
  3. See error
? Enter a new environment name: diberry-js-contoso

Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.

  (✓) Done: Downloading Bicep
? Select an Azure Subscription to use: 22. Azure Dev Platform Services Content Team (2123cb08-23fa-4a80-afec-4ec9e015433f)
  (✓) Done: Retrieving locations...
? Select an Azure location to use: 43. (US) East US 2 (eastus2)
  (✓) Done: Retrieving locations...

  You can view detailed progress in the Azure Portal:
  https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2F2123cb08-23fa-4a80-afec-4ec9e015433f%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fdiberry-js-contoso-1697475232

  (✓) Done: Resource group: rg-diberry-js-contoso
  (✓) Done: App Service plan: plan-fr5n7zfquo67a
  (✓) Done: Static Web App: stapp-web-fr5n7zfquo67a
  (✓) Done: Log Analytics workspace: log-fr5n7zfquo67a
  (✓) Done: Key Vault: kv-fr5n7zfquo67a
  (✓) Done: Storage account: stfr5n7zfquo67a
  (✓) Done: Application Insights: appi-fr5n7zfquo67a
  (✓) Done: Portal dashboard: dash-fr5n7zfquo67a
  (x) Failed: Azure Database for PostgreSQL flexible server: psql-db-fr5n7zfquo67a
  (✓) Done: Container Registry: crfr5n7zfquo67a
  (✓) Done: Container Apps Environment: cae-fr5n7zfquo67a
  (✓) Done: Azure Cosmos DB: cosmos-fr5n7zfquo67a

ERROR: deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:

Deployment Error Details:
ParameterOutOfRange: The value of the 'Version' should be in: []. Verify that the specified parameter value is correct.

TraceID: 99593d10b4e5c6e0a822e820a1998290

Expected behavior Error is something I can fix.

Screenshots If applicable, add screenshots to help explain your problem.

image

OS (please complete the following information):

Additional context Add any other context about the problem here.

diberry commented 1 year ago

It works if I deploy to west europe so I'm closing. I think how brittle the location is may be resolved with west europe but won't be solved for customers who don't know how to publish to any other region.