├── .gitignore ├── Extension ├── images │ ├── logo.png │ └── skeleton.gif ├── README.md ├── LICENSE.md ├── package.json └── CHANGELOG.md ├── .gitmodules ├── README.md ├── tools ├── SnippetConvert.ps1 └── UpdateSnippetFile.ps1 └── azure-pipelines.yml /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .vs/VSWorkspaceState.json 3 | .vs/arm-snippets-vscode/v15/.suo 4 | .vs/slnx.sqlite 5 | -------------------------------------------------------------------------------- /Extension/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam-cogan/arm-snippets-vscode/HEAD/Extension/images/logo.png -------------------------------------------------------------------------------- /Extension/images/skeleton.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam-cogan/arm-snippets-vscode/HEAD/Extension/images/skeleton.gif -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "azure-xplat-arm-tooling"] 2 | path = azure-xplat-arm-tooling 3 | url = https://github.com/sam-cogan/azure-xplat-arm-tooling 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VS Code Azure Resource Manager Snippets 2 | 3 | ## This extension is now deprecated and will be removed soon. The snippets have all been integrated into the [Azure Resource Manager (ARM) Tools extensions](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools). Please move to this extension to get the latest snippets. 4 | 5 | -------------------------------------------------------------------------------- /tools/SnippetConvert.ps1: -------------------------------------------------------------------------------- 1 | function transformARMResource 2 | 3 | { 4 | 5 | param([string] $filePath) 6 | 7 | 8 | $template=(get-content $filePath) 9 | 10 | $template=$template.Replace('"','\"') 11 | $template=$template | foreach-object {'"'+$_ + '",'} 12 | 13 | foreach($line in $template){ 14 | Write-Host $line 15 | } 16 | 17 | } 18 | 19 | transformARMResource C:\temp\ipprefix.json -------------------------------------------------------------------------------- /Extension/README.md: -------------------------------------------------------------------------------- 1 | # Snippets for Creating Azure Resource Manager Templates 2 | 3 | ![Build Stats](https://dev.azure.com/samcogandemo/githubbuilds/_apis/build/status/sam-cogan.arm-snippets-vscode) 4 | 5 | ## This extension is now deprecated and will be removed soon. The snippets have all been integrated into the [Azure Resource Manager (ARM) Tools extensions](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools). Please move to this extension to get the latest snippets. 6 | 7 | -------------------------------------------------------------------------------- /tools/UpdateSnippetFile.ps1: -------------------------------------------------------------------------------- 1 | [CmdletBinding()] 2 | param ( 3 | [Parameter(Mandatory=$true)] 4 | [string]$pathToFile, 5 | [Parameter(Mandatory=$true)] 6 | [string]$pathToPackageFile, 7 | [Parameter(Mandatory=$true)] 8 | [string]$buildNumber 9 | ) 10 | 11 | "{" + (Get-Content $pathToFile -Raw) + "}" | Set-Content $pathToFile 12 | 13 | Write-Output "Build Number:$buildNumber" 14 | 15 | 16 | 17 | (Get-Content $pathToPackageFile -Raw) -replace "extensionversionnumber", $buildNumber | Set-Content $pathToPackageFile 18 | 19 | Write-Output $(Get-Content $pathToPackageFile -Raw) -------------------------------------------------------------------------------- /Extension/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Extension/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "arm-snippets", 3 | "displayName": "Azure Resource Manager Snippets", 4 | "description": "Snippets for creating Azure Resource Manager Templates", 5 | "license": "SEE LICENSE IN LICENSE.md", 6 | "version": "extensionversionnumber", 7 | "publisher": "samcogan", 8 | "icon": "images/logo.png", 9 | "galleryBanner": { 10 | "color": "#939290", 11 | "theme": "dark" 12 | }, 13 | "keywords": [ 14 | "Azure", 15 | "ARM", 16 | "Snippets", 17 | "JSON" 18 | ], 19 | "homepage": "https://samcogan.com", 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/sam-cogan/arm-snippets-vscode.git" 23 | }, 24 | "engines": { 25 | "vscode": "^1.13.0" 26 | }, 27 | "categories": [ 28 | "Snippets", 29 | "Azure" 30 | ], 31 | "contributes": { 32 | "snippets": [ 33 | { 34 | "language": "json", 35 | "path": "./snippets/armsnippets.json" 36 | }, 37 | { 38 | "language": "jsonc", 39 | "path": "./snippets/armsnippets.json" 40 | }, 41 | { 42 | "language": "arm-template", 43 | "path": "./snippets/armsnippets.json" 44 | } 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Extension/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## [1.0.0] - 2017-06-26 4 | - Initial release 5 | 6 | ## [1.0.1] - 2017-06-27 7 | - Changed Extension Logo 8 | 9 | ## [1.1.0] - 2017-11-10 10 | - Added snippets for NSG, NSG Rule 11 | - Added snippets for DNS Zone, DNS Record 12 | - Added snippets for Azure Container Instances 13 | 14 | ## [1.2.0] - 2018-06-30 15 | - Added snippets for Cosmos DB 16 | - Added snippets for Azure Automation Accounts, Variables, Certificates, Credentials, Runbooks, Schedules 17 | - Added snippets for Azure Kubernetes Service (AKS) Cluster 18 | 19 | ## [1.3.0] - 2018-10-14 20 | - Added snippets for Public IP Prefixes 21 | - Added snippets for Load Balancers (internal and external) 22 | - Added snippets for Route Tables and Routes 23 | - Added snippets for Traffic Manager Profile 24 | 25 | ## [1.4.2] - 2018-12-29 26 | - Added snippets for VPN Gateways and Connections 27 | 28 | ## [1.4.7] - 2019-01-19 29 | - Added snippets for Azure Container Registry 30 | - Added snippets for Application Security groups 31 | - Added snippets for Azure Data Lake Store 32 | - Added snippets for tags 33 | - Fixed outdated values on storage accounts 34 | - Bug Fixes 35 | 36 | ## [1.4.9] - 2019-01-20 37 | - Added snippets for Logic App 38 | - Added snippets for Log Analytics Workspace 39 | - Added snippets for User Assigned Managed Identity 40 | - Added snippets for Recovery Services Vault 41 | 42 | ## [1.4.10] - 2019-02-16 43 | - Added support for jsonc files 44 | 45 | ## [1.4.12] - 2019-03-20 46 | - Bug fixes 47 | 48 | ## [1.4.13] - 2019-03-21 49 | - Add Azure Functions 50 | 51 | ## [1.4.14] - 2019-05-25 52 | - Added Cosmos DB Snippets 53 | 54 | ## [1.4.14] - 2019-08-21 55 | - Azure Automation Updates 56 | - Order and Version Updates 57 | 58 | ## [1.4.19] - 2019-09-26 59 | - Add support for arm-template files 60 | 61 | ## [1.4.20] - 2019-10-25 62 | - Add Azure Front Door 63 | - Add Azure Front Door WAF Profile 64 | - Add Azure AD Domain Services 65 | 66 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | resources: 2 | - repo: self 3 | clean: true 4 | queue: 5 | name: Hosted 6 | demands: 7 | - npm 8 | - DotNetFramework 9 | 10 | name: 1.4$(Rev:.r) 11 | 12 | steps: 13 | - task: Npm@0 14 | displayName: 'npm install' 15 | inputs: 16 | arguments: '-g vsce' 17 | 18 | - task: fakhrulhilal-maktum.GitDownloader.git-downloader.GitDownloader@0 19 | displayName: 'Fetch git: https://github.com/sam-cogan/azure-xplat-arm-tooling' 20 | inputs: 21 | RepositoryUrl: 'https://github.com/sam-cogan/azure-xplat-arm-tooling' 22 | 23 | RepositoryPath: '$(Build.GitDirectory)\snippetsrepo' 24 | 25 | - task: CopyFiles@2 26 | displayName: 'Copy Files to: $(build.artifactstagingdirectory)\extension\' 27 | inputs: 28 | SourceFolder: Extension 29 | 30 | TargetFolder: '$(build.artifactstagingdirectory)\extension\' 31 | 32 | 33 | - task: CopyFiles@2 34 | displayName: 'Copy Files to: $(build.artifactstagingdirectory)\extension\snippets' 35 | inputs: 36 | SourceFolder: '$(Build.GitDirectory)\snippetsrepo\VSCode' 37 | 38 | Contents: armsnippets.json 39 | 40 | TargetFolder: '$(build.artifactstagingdirectory)\extension\snippets' 41 | 42 | OverWrite: true 43 | 44 | - task: PowerShell@1 45 | displayName: 'PowerShell Script' 46 | inputs: 47 | scriptName: tools/UpdateSnippetFile.ps1 48 | 49 | arguments: '-pathToFile $(build.artifactstagingdirectory)\extension\snippets\armsnippets.json -pathToPackageFile $(build.artifactstagingdirectory)\extension\package.json -buildNumber $(Build.BuildNumber)' 50 | 51 | 52 | - task: CmdLine@1 53 | displayName: 'Run vsce ' 54 | inputs: 55 | filename: 'vsce ' 56 | 57 | arguments: package 58 | 59 | workingFolder: '$(build.artifactstagingdirectory)\extension\' 60 | 61 | 62 | - task: PublishBuildArtifacts@1 63 | displayName: 'Publish Artifact: arm-snippets-$(Build.BuildNumber).vsix' 64 | inputs: 65 | PathtoPublish: '$(build.artifactstagingdirectory)\extension\arm-snippets-$(Build.BuildNumber).vsix' 66 | 67 | ArtifactName: 'arm-snippets-$(Build.BuildNumber).vsix' 68 | 69 | 70 | 71 | --------------------------------------------------------------------------------