Azure / Azure/bicep

Auto generated documentation e.g. Markdown and schema

Open
#4,935 8 comments 9 reactions 0 assignees View on GitHub
enhancement
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

_Originally posted by @Antse in https://github.com/Azure/bicep/discussions/2301#discussioncomment-702665_

by auto generated documentation i mean something like : (must confess i take some example from the official documentation)

Code :

``` bicep
@description('This is the storage account Name')
param stoName string

@description('This is my secure param')
@secure()
param secureParam string

resource stg 'Microsoft.Storage/storageAccounts@2019-06-01' = {
name: stoName // must be globally unique
location: 'eastus'
sku: {
name: 'Standard_LRS'
}
kind: 'StorageV2'
properties: {
supportsHttpsTrafficOnly: true
}
tags: {
'env':secureParam
}
}
```

Doc :

# Deploy a Storage Account

## Overview (global deployed resources schema)

image

## Parameters

### stoName
- Type
string
- Default value
None
- Description
This is the storage account Name

### secureParam
- Type
secure string
- Default value
None
- Description
This is my Secure Param

## Examples

## Deploy Bicep file to a resource group

**Az CLI**:

```bash
az deployment group create -f ./main.bicep -g my-rg
```

**Azure PowerShell**:

```powershell
New-AzResourceGroupDeployment -TemplateFile ./main.bicep -ResourceGroupName my-rg
```

>**Note:** make sure you update the default value of the `stoName` parameter to be globally unique before deploying.

## Deploy with parameters

Our Bicep file exposed two parameters that we can be optionally overridden (`secureParam` and `stoName`) by passing new values at deployment time.

### Pass parameters on the command line

**Az CLI**:

```bash
az deployment group create -f ./main.bicep -g my-rg --parameters secureParam=MySecretParam stoName=uniquelogstorage001
```

**Azure PowerShell**:

```powershell
New-AzResourceGroupDeployment -TemplateFile ./main.bicep -ResourceGroupName my-rg -location westus -stoName uniquelogstorage001 -secureParam MysecretParam
```

Contributor guide

Open the contributing guide

Research direction

Start with the Bicep example and the proposed Markdown and schema output in the issue, then review the linked discussion for the intended scope. Done should include an agreed approach for generating documentation from Bicep files, covering parameters, resource structure, examples, and deployment commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, markdown
Domain
cloud, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.