Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type element to contributing-wiki #674

Merged
merged 2 commits into from
Nov 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions docs/wiki/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Throughout the development of Bicep code you should follow the [Bicep Best Pract

- Strict `camelCasing` must be used for all elements:
- Symbolic names for:
- Types
- Parameters
- Variables
- Resource
Expand All @@ -102,6 +103,7 @@ Throughout the development of Bicep code you should follow the [Bicep Best Pract

| Element Type | Naming Prefix | Example |
| :----------: | :-----------: | :------------------------------------------------------------------- |
| Types | `typ` | `typCustomRole`, `typSubnetOptions` |
| Parameters | `par` | `parLocation`, `parManagementGroupsNamePrefix` |
| Variables | `var` | `varConditionExpression`, `varIntermediateRootManagementGroupName` |
| Resources | `res` | `resIntermediateRootManagementGroup`, `resResourceGroupLogAnalytics` |
Expand All @@ -122,7 +124,7 @@ For all Bicep files created as part of this project they will follow the structu

![Bicep File Structure By Element Type Image](media/bicep-structure.png)

> Parameters, Variables, Resources, Modules & Outputs are all types of elements.
> Types, Parameters, Variables, Resources, Modules & Outputs are all types of elements.

### Bicep File Structure Example

Expand All @@ -132,9 +134,16 @@ Below is an example of Bicep file complying with the structure and styling guide
// SCOPE
targetScope = 'subscription' //Deploying at Subscription scope to allow resource groups to be created and resources in one deployment

// METADATA
metadata name = 'ALZ Bicep - Example Module'
metadata description = 'ALZ Bicep Module used as an example'

// TYPES
@minValue(0)
type typExampleNonNegativeInteger = int

// PARAMETERS
@sys.description('Example description for parameter. - DEFAULT VALUE: "TEST"')
@sys.description('Example description for parameter.') // Avoid describing default values
param parExampleResourceGroupNamePrefix string = 'TEST'


Expand Down
Loading