Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
402 stars 195 forks source link

Unexpected bicep type: 'secureString' #1289

Closed zedy-wj closed 1 year ago

zedy-wj commented 1 year ago

Describe the issue: We are applying the creation of APIM to all templates and testing them. But when we tested todo-csharp-sql and todo-csharp-sql-swa-func templates, we found this problem when executing azd up: Unexpected bicep type: 'secureString'. According to the investigation, this is a problem in staging branch, and has nothing to do with APIM.

Repro steps:

  1. Login with azd login
  2. Run command: azd init -t Azure-Samples/todo-csharp-sql -b pr/1279
  3. Run command: azd up image

Environments: OS: Codespaces, Windows desktop, MacOS desktop, Linux desktop, Devcontainer in VS Code, WSL Templates: todo-csharp-sql and todo-csharp-sql-swa-func Branch: pr/1279 Azd version: 0.4.0-beta.2-daily.2062439 (commit e9baa6ae0f948aaa4fa58bfc9cf0160eff2de275)

Expected behavior: azd up can create and deploy resources normally.

@rajeshkamal5050 for notification.

ellismg commented 1 year ago

I opened #1294 to address this issue. CI should have privates soon. I was able verify locally that I was able to deploy the given infrastructure.

v-jiaodi commented 1 year ago

@rajeshkamal5050 This issue also occurs in the following cases:

v-jiaodi commented 1 year ago

@ellismg Similar issue occurs in the following cases, please help to review and resolve it.

Error message: image

Repro steps:

  1. Login with azd login
  2. Run command: azd init -t Azure-Samples/todo-csharp-sql
  3. Run command: azd up
v-jiaodi commented 1 year ago

@ellismg Same issue occurs in the following cases, please help to review and resolve it.

Error message: image

Repro steps:

1.Clone this repository localy.

  1. Login with azd login
  2. Run command: azd init
  3. Add the following environment variables to .env.
    AZD_PIPELINE_PROVIDER="github"
    AZURE_ADMIN_PASSWORD="<THE JUMPHOST PASSWORD>"
    AZURE_ADMIN_USERNAME="<THE JUMPHOST USERNAME>"
    AZURE_APPLICATION_NAME="<AN APPLICATION NAME>"
    AZURE_ENV_NAME="prod"
    AZURE_FQDN="<THE FQDN OF THE SITE>"
    AZURE_LOCATION="<AN AZURE DC REGION>"
    AZURE_MARIADB_PASSWORD="<THE MARIADB PASSWORD>"
    AZURE_PRINCIPAL_ID=""
    AZURE_SUBSCRIPTION_ID="<YOUR AZURE SUBSCRIPTION ID>"
    resourceGroupName="<THE RESOURCE GROUP NAME>"
  4. Run azd provision.
weikanglim commented 1 year ago

@v-jiaodi There's a slight difference between this new issue and the old issue.

In the new error, the message reads: unexpected bicep type: 'securestring' instead of secureString

This has been fixed in the latest daily build, after #1650. Can you test it on daily and verify that it is fixed?

weikanglim commented 1 year ago

Tested with the daily, and everything works fine.

v-jiaodi commented 1 year ago

@weikanglim We have tested with the daily, this issue no longer exists. We will close this issue.