From c7246e3459929c6acb16946caa01268804a90a7a Mon Sep 17 00:00:00 2001 From: Anthony Martin <38542602+anthony-c-martin@users.noreply.github.com> Date: Tue, 2 Jan 2024 13:31:22 -0500 Subject: [PATCH 1/3] Add `.bicepparam` to list of Bicep file extensions --- lib/linguist/languages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 3441a3f316..50f3387ad8 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -573,6 +573,7 @@ Bicep: color: "#519aba" extensions: - ".bicep" + - ".bicepparam" tm_scope: source.bicep ace_mode: text language_id: 321200902 From a7926498a781e784d45aa9e27fb5258f64380891 Mon Sep 17 00:00:00 2001 From: Anthony Martin <38542602+anthony-c-martin@users.noreply.github.com> Date: Tue, 2 Jan 2024 13:36:56 -0500 Subject: [PATCH 2/3] Add bicepparam sample --- samples/Bicep/params.bicepparam | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 samples/Bicep/params.bicepparam diff --git a/samples/Bicep/params.bicepparam b/samples/Bicep/params.bicepparam new file mode 100644 index 0000000000..2e54490004 --- /dev/null +++ b/samples/Bicep/params.bicepparam @@ -0,0 +1,36 @@ +/* +This is a +multiline comment! +*/ + +// This is a single line comment + +// using keyword for specifying a Bicep file +using './params_main.bicep' + +// parameter assignment to literals +param myString = 'hello world!!' +param myInt = 42 +param myBool = true + +// parameter assignment to objects +param password = 'strongPassword' +param secretObject = { + name : 'vm2' + location : 'westus' +} +param storageSku = 'Standard_LRS' +param storageName = 'myStorage' +param someArray = [ + 'a' + 'b' + 'c' + 'd' +] +param emptyMetadata = 'empty!' +param description = 'descriptive description' +param description2 = 'also descriptive' +param additionalMetadata = 'more metadata' +param someParameter = 'three' +param stringLiteral = 'abc' +param decoratedString = 'Apple' From e86aae1fcabbfbd9c27267e292e63cf2ef622481 Mon Sep 17 00:00:00 2001 From: Anthony Martin <38542602+anthony-c-martin@users.noreply.github.com> Date: Tue, 5 Mar 2024 06:47:47 -0500 Subject: [PATCH 3/3] Add real-world bicepparam example --- samples/Bicep/params.bicepparam | 55 +++++++++++++-------------------- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git a/samples/Bicep/params.bicepparam b/samples/Bicep/params.bicepparam index 2e54490004..03544ffa07 100644 --- a/samples/Bicep/params.bicepparam +++ b/samples/Bicep/params.bicepparam @@ -1,36 +1,25 @@ -/* -This is a -multiline comment! -*/ +using 'br/public:ai/cognitiveservices:1.1.1' -// This is a single line comment +var suffix = 'ac9h8d' -// using keyword for specifying a Bicep file -using './params_main.bicep' - -// parameter assignment to literals -param myString = 'hello world!!' -param myInt = 42 -param myBool = true - -// parameter assignment to objects -param password = 'strongPassword' -param secretObject = { - name : 'vm2' - location : 'westus' -} -param storageSku = 'Standard_LRS' -param storageName = 'myStorage' -param someArray = [ - 'a' - 'b' - 'c' - 'd' +param skuName = 'S0' +param kind = 'OpenAI' +param name = 'openai-${suffix}' +param location = 'westus2' +param deployments = [ + { + name: 'model-deployment-${suffix}' + sku: { + name: 'Standard' + capacity: 120 + } + properties: { + model: { + format: 'OpenAI' + name: 'text-davinci-002' + version: 1 + } + raiPolicyName: 'Microsoft.Default' + } + } ] -param emptyMetadata = 'empty!' -param description = 'descriptive description' -param description2 = 'also descriptive' -param additionalMetadata = 'more metadata' -param someParameter = 'three' -param stringLiteral = 'abc' -param decoratedString = 'Apple'