Skip to content

Commit

Permalink
[Snippet] Added ExpressRoute Gateway snippet (#3920)
Browse files Browse the repository at this point in the history
* ExpressRoute Gateway snippet
  • Loading branch information
StefanIvemo authored Aug 31, 2021
1 parent b316af9 commit 5856f2a
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/Bicep.Core.Samples/Files/Completions/declarations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,35 @@
]
}
},
{
"label": "res-expressroute-gateway",
"kind": "snippet",
"detail": "ExpressRoute Gateway",
"documentation": {
"kind": "markdown",
"value": "```bicep\nresource expressRouteGateways 'Microsoft.Network/expressRouteGateways@2021-02-01' = {\n name: 'name'\n location: resourceGroup().location\n properties: {\n virtualHub: {\n id: 'virtualHub.id'\n }\n autoScaleConfiguration: {\n bounds: {\n min: 1\n max: 1\n }\n }\n }\n}\n\n```"
},
"deprecated": false,
"preselect": false,
"sortText": "2_res-expressroute-gateway",
"insertTextFormat": "snippet",
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "resource ${1:expressRouteGateways} 'Microsoft.Network/expressRouteGateways@2021-02-01' = {\n name: ${2:'name'}\n location: resourceGroup().location\n properties: {\n virtualHub: {\n id: ${3:'virtualHub.id'}\n }\n autoScaleConfiguration: {\n bounds: {\n min: ${4|1,2,3,4,5,6,7,8|}\n max: ${5|1,2,3,4,5,6,7,8|}\n }\n }\n }\n}\n"
},
"command": {
"command": "bicep.Telemetry",
"arguments": [
{
"EventName": "TopLevelDeclarationSnippetInsertion",
"Properties": {
"name": "res-expressroute-gateway"
}
}
]
}
},
{
"label": "res-firewall",
"kind": "snippet",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// $1 = expressRouteGateways
// $2 = 'name'
// $3 = 'virtualHub.id'
// $4 = 1
// $5 = 2

// Insert snippet here
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// $1 = expressRouteGateways
// $2 = 'name'
// $3 = 'virtualHub.id'
// $4 = 1
// $5 = 2

resource expressRouteGateways 'Microsoft.Network/expressRouteGateways@2021-02-01' = {
name: 'name'
location: resourceGroup().location
properties: {
virtualHub: {
id: 'virtualHub.id'
}
autoScaleConfiguration: {
bounds: {
min: 1
max: 2
}
}
}
}
// Insert snippet here
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// ExpressRoute Gateway
resource /*${1:expressRouteGateways}*/expressRouteGateways 'Microsoft.Network/expressRouteGateways@2021-02-01' = {
name: /*${2:'name'}*/'name'
location: resourceGroup().location
properties: {
virtualHub: {
id: /*${3:'virtualHub.id'}*/'virtualHub.id'
}
autoScaleConfiguration: {
bounds: {
min: /*${4|1,2,3,4,5,6,7,8|}*/1
max: /*${5|1,2,3,4,5,6,7,8|}*/2
}
}
}
}

0 comments on commit 5856f2a

Please sign in to comment.