Skip to content

Feature request: Structured (JSON) output option for bicep local-deploy #18361

@johnlokerse

Description

@johnlokerse

Is your feature request related to a problem? Please describe.
Currently, the output of bicep local-deploy is unstructured and formatted as a table. This makes it difficult to consume the output programmatically, for example, when "chaining" Bicep deployments that are not local-deploy scoped deployments or when integrating outputs with other systems or CI/CD steps that are not Bicep-based.

See current output below:

Image

Describe the solution you'd like
Add support for a structured output format (ideally JSON) to make automation and integration easier.

Example command and output:

Command
bicep local-deploy --parameters main.bicepparam --output-type json

Output

{
  "resources": [
    {
      "resource": "extension[0]",
      "duration": "0.8s",
      "status": "Succeeded"
    },
    {
      "resource": "project",
      "duration": "1.0s",
      "status": "Succeeded"
    },
    {
      "resource": "repository",
      "duration": "0.6s",
      "status": "Succeeded"
    },
    {
      "resource": "readerPermission",
      "duration": "1.6s",
      "status": "Succeeded"
    },
    {
      "resource": "serviceConnection",
      "duration": "1.0s",
      "status": "Succeeded"
    },
    {
      "resource": "artifactFeed",
      "duration": "3.9s",
      "status": "Succeeded"
    }
  ],
  "outputs": {
    "artifactFeedId": "faacbbac-...",
    "artifactFeedUrl": "https://feeds.dev.azure.com/john-lokerse/3c54b11a-.../_apis/Packaging/Feeds/faacbbac-...",
    "projectId": "3c54b11a-...",
    "projectState": "wellFormed",
    "projectUrl": "https://dev.azure.com/john-lokerse/_apis/projects/3c54b11a...",
    "repositoryId": "fc7db0ed...",
    "repositoryRemoteUrl": "https://[email protected]/john-lokerse/SampleProjectCreatedByBicep/_git/FirstRepoCreatedByBicep",
    "repositorySshUrl": "[email protected]:v3/john-lokerse/SampleProjectCreatedByBicep/FirstRepoCreatedByBicep",
    "repositoryWebUrl": "https://dev.azure.com/john-lokerse/SampleProjectCreatedByBicep/_git/FirstRepoCreatedByBicep",
    "serviceConnectionIdentifier": "/eid1/c/pub/t/.../a/rISbSSETf0KqFyZ8ppdXmA/sc/d11218c7-.../95ad86f5-...",
    "serviceConnectionIssuer": "https://login.microsoftonline.com/2fd31e1e-.../v2.0"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions