From aaa05be20d66a252848cc4a266ff8c7d839c382b Mon Sep 17 00:00:00 2001 From: Eskil Uhlving Larsen <7443949+picccard@users.noreply.github.com> Date: Sun, 5 Nov 2023 23:41:35 +0100 Subject: [PATCH 1/2] add type element --- docs/wiki/Contributing.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/wiki/Contributing.md b/docs/wiki/Contributing.md index ad4e7c999..ef834c0a3 100644 --- a/docs/wiki/Contributing.md +++ b/docs/wiki/Contributing.md @@ -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 @@ -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` | @@ -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 @@ -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' From 514d5e82b670a96929b95f2049b67822832d3165 Mon Sep 17 00:00:00 2001 From: Jack Tracey <41163455+jtracey93@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:58:00 +0000 Subject: [PATCH 2/2] Update Contributing.md --- docs/wiki/Contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/wiki/Contributing.md b/docs/wiki/Contributing.md index ef834c0a3..2fd27eafb 100644 --- a/docs/wiki/Contributing.md +++ b/docs/wiki/Contributing.md @@ -143,7 +143,7 @@ metadata description = 'ALZ Bicep Module used as an example' type typExampleNonNegativeInteger = int // PARAMETERS -@sys.description('Example description for parameter.') // Avoid describing default values +@sys.description('Example description for parameter.') // Avoid describing default values param parExampleResourceGroupNamePrefix string = 'TEST'