Skip to content

Commit

Permalink
RG().location/et al => location param in snippets (#5226)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenWeatherford authored Dec 8, 2021
1 parent 912c33f commit 7b0ed6f
Show file tree
Hide file tree
Showing 233 changed files with 3,016 additions and 2,571 deletions.
296 changes: 148 additions & 148 deletions src/Bicep.Core.Samples/Files/Completions/declarations.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"detail": "DNS Record",
"documentation": {
"kind": "markdown",
"value": "```bicep\n{\n name: 'name'\n location: resourceGroup().location\n}\n\n```"
"value": "```bicep\n{\n name: 'name'\n location: location\n}\n\n```"
},
"deprecated": false,
"preselect": true,
Expand All @@ -112,7 +112,7 @@
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "{\n name: ${1:'name'}\n location: resourceGroup().location\n}\n"
"newText": "{\n name: ${1:'name'}\n location: ${2:location}\n}\n"
},
"command": {
"command": "bicep.Telemetry",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// $1 = aksCluster
// $2 = 'name'
// $3 = 1.19.7
// $4 = 'dnsPrefix'
// $5 = 3
// $6 = 'Standard_DS2_v2'
// $7 = adminUsername
// $8 = 'REQUIRED'
// $3 = location
// $4 = 1.19.7
// $5 = 'dnsPrefix'
// $6 = 3
// $7 = 'Standard_DS2_v2'
// $8 = adminUsername
// $9 = 'REQUIRED'

param adminUsername string
param location string

// Insert snippet here
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
// $1 = aksCluster
// $2 = 'name'
// $3 = 1.19.7
// $4 = 'dnsPrefix'
// $5 = 3
// $6 = 'Standard_DS2_v2'
// $7 = adminUsername
// $8 = 'REQUIRED'
// $3 = location
// $4 = 1.19.7
// $5 = 'dnsPrefix'
// $6 = 3
// $7 = 'Standard_DS2_v2'
// $8 = adminUsername
// $9 = 'REQUIRED'

param adminUsername string
param location string

resource aksCluster 'Microsoft.ContainerService/managedClusters@2021-03-01' = {
name: 'name'
location: resourceGroup().location
location: location
identity: {
type: 'SystemAssigned'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// $1 = apiManagementInstance
// $2 = 'name'
// $3 = 1
// $4 = 'Developer'
// $5 = 'None'
// $6 = 'publisherEmail@contoso.com'
// $7 = 'publisherName'
// $3 = location
// $4 = 1
// $5 = 'Developer'
// $6 = 'None'
// $7 = 'publisherEmail@contoso.com'
// $8 = 'publisherName'

param location string

// Insert snippet here
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
// $1 = apiManagementInstance
// $2 = 'name'
// $3 = 1
// $4 = 'Developer'
// $5 = 'None'
// $6 = 'publisherEmail@contoso.com'
// $7 = 'publisherName'
// $3 = location
// $4 = 1
// $5 = 'Developer'
// $6 = 'None'
// $7 = 'publisherEmail@contoso.com'
// $8 = 'publisherName'

resource apiManagementInstance 'Microsoft.ApiManagement/service@2020-12-01' = {
name: 'name'
location: resourceGroup().location
sku:{
capacity: 1
name: 'Developer'
}
properties:{
virtualNetworkType: 'None'
publisherEmail: 'publisherEmail@contoso.com'
publisherName: 'publisherName'
}
}
param location string

resource apiManagementInstance 'Microsoft.ApiManagement/service@2020-12-01' = {
name: 'name'
location: location
sku:{
capacity: 1
name: 'Developer'
}
properties:{
virtualNetworkType: 'None'
publisherEmail: 'publisherEmail@contoso.com'
publisherName: 'publisherName'
}
}
// Insert snippet here

Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
// $1 = applicationGatewayFirewall
// $2 = 'name'
// $3 = true
// $4 = 128
// $5 = 100
// $6 = Enabled
// $7 = Detection
// $8 = 'ruleSetType'
// $9 = 'ruleSetVersion'
// $3 = location
// $4 = true
// $5 = 128
// $6 = 100
// $7 = Enabled
// $8 = Detection
// $9 = 'ruleSetType'
// $10 = 'ruleSetVersion'

param location string

// Insert snippet here
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
// $1 = applicationGatewayFirewall
// $2 = 'name'
// $3 = true
// $4 = 128
// $5 = 100
// $6 = Enabled
// $7 = Detection
// $8 = 'ruleSetType'
// $9 = 'ruleSetVersion'
// $3 = location
// $4 = true
// $5 = 128
// $6 = 100
// $7 = Enabled
// $8 = Detection
// $9 = 'ruleSetType'
// $10 = 'ruleSetVersion'

resource applicationGatewayFirewall 'Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies@2020-11-01' = {
name: 'name'
location: resourceGroup().location
properties: {
policySettings: {
requestBodyCheck: true
maxRequestBodySizeInKb: 128
fileUploadLimitInMb: 100
state: 'Enabled'
mode: 'Detection'
}
managedRules: {
managedRuleSets: [
{
ruleSetType: 'ruleSetType'
ruleSetVersion: 'ruleSetVersion'
}
]
}
}
}
param location string

resource applicationGatewayFirewall 'Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies@2020-11-01' = {
name: 'name'
location: location
properties: {
policySettings: {
requestBodyCheck: true
maxRequestBodySizeInKb: 128
fileUploadLimitInMb: 100
state: 'Enabled'
mode: 'Detection'
}
managedRules: {
managedRuleSets: [
{
ruleSetType: 'ruleSetType'
ruleSetVersion: 'ruleSetVersion'
}
]
}
}
}
// Insert snippet here

Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
// $1 = applicationGateway
// $2 = 'name'
// $3 = Standard_Small
// $4 = Standard
// $5 = 2
// $6 = 'name'
// $7 = 'id'
// $8 = 'name'
// $9 = 'id'
// $10 = 'name'
// $11 = 80
// $12 = 'name'
// $3 = location
// $4 = Standard_Small
// $5 = Standard
// $6 = 2
// $7 = 'name'
// $8 = 'id'
// $9 = 'name'
// $10 = 'id'
// $11 = 'name'
// $12 = 80
// $13 = 'name'
// $14 = 80
// $15 = Http
// $16 = 'name'
// $17 = 'id'
// $14 = 'name'
// $15 = 80
// $16 = Http
// $17 = 'name'
// $18 = 'id'
// $19 = Http
// $20 = 'name'
// $21 = Basic
// $22 = 'id'
// $19 = 'id'
// $20 = Http
// $21 = 'name'
// $22 = Basic
// $23 = 'id'
// $24 = 'id'
// $25 = 'id'

param location string

// Insert snippet here
Loading

0 comments on commit 7b0ed6f

Please sign in to comment.