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
387 stars 178 forks source link

[Issue]Getting InvalidTemplateDeployment on azd infra create #1097

Open arieschwartzman opened 1 year ago

arieschwartzman commented 1 year ago

Output from azd version azd version 0.4.0-beta.1 (commit 2bf7a529914d86d8e9f5d7b6f95a4f20a2351e01)

Output from az version { "azure-cli": "2.42.0", "azure-cli-core": "2.42.0", "azure-cli-telemetry": "1.0.8", "extensions": {} }

Describe the bug I'm getting this error when running the azd infra create

{
  "error": {
    "code": "InvalidTemplateDeployment",
    "message": "The template deployment 'arieazd' is not valid according to the validation procedure. The tracking id is '0a270d78-e6fc-4286-997c-1d2b5d69ca7a'. See inner errors for details.",
    "details": [
      {
        "code": "OpenAPISpecValidationFailedForTemplateDeploymentResources",
        "message": "One or more resources in template deployment preflight validation request failed during OpenApi spec (swagger) validation. Please check error details for the resource identifiers.",
        "details": [
          {
            "code": "HttpPayloadAPISpecValidationFailed",
            "target": "/subscriptions/3e66c004-5bd4-4597-807b-5a37afe6d52c/providers/Microsoft.HealthBot/healthBots/ariebicep-azd-bot",
            "message": "Failed during request payload validation against the API specification"
          }
        ]
      }
    ]
  }
}

To Reproduce See attached archive.zip file with the azd folder

Expected behavior A clear and concise description of what you expected to happen.

Environment Information on your environment:

Additional context Zip file with the azure.yaml and infra folder Archive.zip

rajeshkamal5050 commented 1 year ago

@jongio @wbreza anything related to the new Bicep tool release mandating changes to bicep code?

@arieschwartzman do you see this issue even when you try to provision resources directly via az cli?

jongio commented 1 year ago

I would also like to see if this works with you just run az deployment create - I don't think the above error would be caused by azd, but I could be wrong.