Azure / bicep

Bicep is a declarative language for describing and deploying Azure resources
MIT License
3.26k stars 753 forks source link

Import aliases from bicepconfig.json are not used in JSON generation #15396

Open anthony-c-martin opened 4 weeks ago

anthony-c-martin commented 4 weeks ago

The generated output includes the import with name "MicrosoftGraph" instead of "microsoftGraphV1_0" as defined in bicepconfig.json:

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "languageVersion": "2.1-experimental",
  "contentVersion": "1.0.0.0",
  "metadata": {
    "_EXPERIMENTAL_WARNING": "This template uses ARM features that are experimental. Experimental features should be enabled for testing purposes only, as there are no guarantees about the quality or stability of these features. Do not enable these settings for any production usage, or your production environment may be subject to breaking.",
    "_EXPERIMENTAL_FEATURES_ENABLED": [
      "Extensibility"
    ],
    "_generator": {
      "name": "bicep",
      "version": "0.30.23.60470",
      "templateHash": "1831071752215083999"
    }
  },
  "imports": {
    "MicrosoftGraph": {
      "provider": "MicrosoftGraph",
      "version": "0.1.8-preview"
    }
  },
  "resources": {
    "foo": {
      "import": "MicrosoftGraph",
      "type": "Microsoft.Graph/applications@v1.0",
      "properties": {
        "displayName": "asdf",
        "uniqueName": "asdf"
      }
    }
  }
}
anthony-c-martin commented 4 weeks ago

Note that this requires a backend service change to first have been rolled out (https://msazure.visualstudio.com/One/_git/AzureUX-Deployments/pullrequest/11132995).