├── .gitignore ├── .vscode ├── launch.json └── test.cform ├── .vscodeignore ├── CHANGELOG.md ├── README.md ├── assets ├── install_extension.gif ├── known_issue1.png └── new_template_file.gif ├── azure-pipelines.yml ├── images └── ManagementTools_CloudFormation.png ├── package.json ├── scripts └── git-package.ps1 ├── snippets ├── snippets.json └── yaml-snippets.json ├── vsc-extension-quickstart.md └── yaml.customTags.json /.gitignore: -------------------------------------------------------------------------------- 1 | cform-0*.vsix 2 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | { 3 | "version": "0.1.0", 4 | "configurations": [ 5 | { 6 | "name": "Launch Extension", 7 | "type": "extensionHost", 8 | "request": "launch", 9 | "runtimeExecutable": "${execPath}", 10 | "args": ["--extensionDevelopmentPath=${workspaceRoot}" ] 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /.vscode/test.cform: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/eb106b2c9c1b0b20545e6a9961a7ce3697611885/.vscode/test.cform -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | **/*.gif 2 | assets/*.png -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Changelog 2 | ------------------- 3 | 0.0.21 4 | * CI/CD - Azure DevOps integration for faster update cycle ongoing from May 2019 5 | * yaml - merged new snippets and fixes 6 | 7 | 0.0.15 8 | * yaml - added additional snippets 9 | * yaml - added instructions how to whitelist intrinsic functions 10 | * installation - extension will now 11 | install YAML Server by default 12 | 13 | 0.0.13 14 | * yaml - most of the snippets translated 15 | 16 | 0.0.12 17 | * yaml - several new snippets added (vpc, ec2-instance, autoscaling-group, rds-dbinstance, elastic-load-balancer-internal, subnet, s3-bucket, s3-bucket-policy, cloudwatch-alarm, ref, get-azs,get-attr, parameter, output, map, find-in-map) 18 | 19 | 0.0.11 20 | * yaml - added test support 21 | * merged new snippets (Codepipeline, Codecommit, LaunchTemplate) 22 | * corrected Tags property 23 | 24 | 0.0.10 25 | * start snippet correction 26 | * lambda support 27 | * function IF 28 | 29 | 0.0.8 30 | * corrected issue with missing language mode UI 31 | * added latest .vsix to GitHub repo for manual install 32 | 33 | 0.0.6 34 | * added support for .cform and .template file extensions -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | CloudFormation support for Visual Studio Code 2 | =================== 3 | [![Build Status](https://dev.azure.com/aws-scripting-guy/cform-VSCode/_apis/build/status/cform-VSCode-CI?branchName=master)](https://dev.azure.com/aws-scripting-guy/cform-VSCode/_build/latest?definitionId=6&branchName=master) 4 | 5 | This is a fork of [ST3 CloudFormation plugin](https://github.com/beaknit/cform). 6 | 7 | News 8 | ------------- 9 | Introducing two release channels: 10 | 1. Stable for scheduled update cycle 11 | 2. Nightly for fast updates based on community commits 12 | 13 | You can find both under section **Releases** on Github: 14 | 15 | [https://github.com/aws-scripting-guy/cform-VSCode/releases](https://github.com/aws-scripting-guy/cform-VSCode/releases) 16 | 17 | Only Stable channel is being published to VS Code marketplace. Nightly build needs to be installed manually from .vsix file. 18 | 19 | Usage 20 | ------------- 21 | 22 | 1. Install the extension 23 | 2. Create **new file** 24 | 3. Set syntax to **JSON** or **YAML** 25 | 4. Type **start** and press ```tab``` key to populate basic template skeleton 26 | 5. **Start typing** desired **resource name** and hit ```tab``` key 27 | 28 | 29 | > **Note:** CloudFormation support works with YAML/JSON syntax selected or .json, .cform, .template file extensions. These are commonly used CloudFormation template extensions. 30 | 31 | ![New template file](https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/master/assets/new_template_file.gif) 32 | 33 | YAML templates 34 | ------------------ 35 | 36 | Extension fully supports YAML templates. YAML template creation follows the same syntax rules: 37 | 38 | 1. Create new YAML document 39 | 2. Type **start** to populate new template 40 | 3. **Start typing** desired **resource name** and hit ```tab``` key 41 | 42 | > **Note:** YAML support is dependent on YAML Language Server. 43 | By default, YAML Language Server (Red Hat YAML recommended) will be installed automatically as prerequisite. 44 | 45 | > **Note:** If you do not want to install YAML Language Server, install version **cform-noyaml.vsix** from [GitHub](https://github.com/aws-scripting-guy/cform-VSCode). 46 | 47 | YAML setup 48 | ------------------ 49 | 50 | After installation, open your User Settings ```(Ctrl + ,)``` and paste preferences below into your settings file. 51 | 52 | > **Note:** This will whitelist CloudFormation intrinsic functions tags. Otherwise you will end up with *Unknown Tag* showing up in your YAML document. 53 | 54 | ```json 55 | // Custom tags for the parser to use 56 | "yaml.customTags": [ 57 | "!And", 58 | "!If", 59 | "!Not", 60 | "!Equals", 61 | "!Or", 62 | "!FindInMap sequence", 63 | "!Base64", 64 | "!Cidr", 65 | "!Ref", 66 | "!Sub", 67 | "!GetAtt", 68 | "!GetAZs", 69 | "!ImportValue", 70 | "!Select", 71 | "!Select sequence", 72 | "!Split", 73 | "!Join sequence" 74 | ], 75 | // Enable/disable default YAML formatter (requires restart) 76 | "yaml.format.enable": true, 77 | ``` 78 | 79 | Troubleshooting 80 | ------------------- 81 | 82 | * Users behing proxy: 83 | Download latest version of .vsix file under Releases from GitHub repo for manual install 84 | [https://github.com/aws-scripting-guy/cform-VSCode/releases](https://github.com/aws-scripting-guy/cform-VSCode/releases) 85 | 86 | Known issues 87 | ------------------- 88 | 89 | When working with YAML documents, your current YAML language interpreter might not support syntax of AWS intrinsic functions, thus marking them as *unknown tag*. 90 | This however has no effect on validity of the YAML document. 91 | 92 | > **Note:** You can solve this issue by whitelisting specific tags following instructions under section **YAML Setup**. 93 | 94 | > **Note:** Tested only with Red Hat YAML Language Server 95 | 96 | ![YAML known issue](https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/master/assets/known_issue1.png) 97 | 98 | Contributions 99 | ------------------- 100 | Contributions: 101 | 102 | 1. Fork 103 | 2. Create your feature branch (git checkout -b my-new-feature) 104 | 3. Commit your changes (git commit -am 'Add some feature') 105 | 4. Push to the branch (git push origin my-new-feature) 106 | 5. Create new Pull Request 107 | 108 | Your feedback is welcome on GitHub. 109 | 110 | Donations 111 | ------------------- 112 | 113 | Paypal 114 | 115 | [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=5DE3L7KRM6RB8&lc=US&item_name=AWS%20Scripting%20Guy¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted) 116 | 117 | -------------------------------------------------------------------------------- /assets/install_extension.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/eb106b2c9c1b0b20545e6a9961a7ce3697611885/assets/install_extension.gif -------------------------------------------------------------------------------- /assets/known_issue1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/eb106b2c9c1b0b20545e6a9961a7ce3697611885/assets/known_issue1.png -------------------------------------------------------------------------------- /assets/new_template_file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/eb106b2c9c1b0b20545e6a9961a7ce3697611885/assets/new_template_file.gif -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # Starter pipeline 2 | # Start with a minimal pipeline that you can customize to build and deploy your code. 3 | # Add steps that build, run tests, deploy, and more: 4 | # https://aka.ms/yaml 5 | 6 | trigger: 7 | - master 8 | 9 | pool: 10 | vmImage: 'vs2017-win2016' 11 | 12 | variables: 13 | update_type: patch 14 | group: build_vars 15 | system.debug: true 16 | 17 | steps: 18 | - checkout: self 19 | persistCredentials: true 20 | 21 | - task: Npm@1 22 | displayName: 'npm install' 23 | inputs: 24 | verbose: true 25 | 26 | - powershell: | 27 | Write-Host "vsce setup" 28 | npm install vsce -g 29 | displayName: 'install vsce' 30 | 31 | - powershell: | 32 | npm config set package-lock false 33 | displayName: 'npm disable package lock' 34 | 35 | - powershell: | 36 | if ((test-path .\package-lock.json) -eq "True") {rm package-lock.json -force} else {} 37 | displayName: "remove package lock if present" 38 | 39 | - powershell: | 40 | (Get-Content -Raw .\snippets\snippets.json | ConvertFrom-Json) 41 | (Get-Content -Raw .\snippets\yaml-snippets.json | ConvertFrom-Json) 42 | displayName: "validate extension JSON schema" 43 | 44 | - powershell: | 45 | Write-Host "setting up git properties for npm version" 46 | git config --global user.email "you@example.com" 47 | git config --global user.name "AWS Scripting Guy from Azure DevOps" 48 | displayName: "set up git properties" 49 | 50 | - powershell: | 51 | git status 52 | git show 53 | git checkout master 54 | displayName: "git checkout master" 55 | 56 | - powershell: | 57 | Write-Host "npm version $(UPDATE_TYPE)" 58 | npm version 59 | npm version $(UPDATE_TYPE) -m "***NO_CI*** %s" -f 60 | displayName: 'update version field in package.json' 61 | 62 | - powershell: | 63 | Write-Host "vsce package" 64 | vsce package 65 | displayName: 'package into .vsix' 66 | 67 | - powershell: | 68 | .\scripts\git-package.ps1 69 | env: 70 | BUILD_REASON: $(Build.Reason) 71 | displayName: "push updated package.json to remote git" 72 | 73 | - task: CopyFiles@2 74 | displayName: 'Copy Files to Artifact Directory)' 75 | inputs: 76 | Contents: | 77 | **\*.vsix 78 | **\package.json 79 | **\images\ManagementTools_CloudFormation.png 80 | TargetFolder: '$(Build.ArtifactStagingDirectory)' 81 | flattenFolders: false 82 | 83 | - task: PublishBuildArtifacts@1 84 | displayName: 'Publish Artifact' 85 | inputs: 86 | pathtoPublish: $(Build.ArtifactStagingDirectory) 87 | artifactName: MyBuildOutputs 88 | -------------------------------------------------------------------------------- /images/ManagementTools_CloudFormation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-scripting-guy/cform-VSCode/eb106b2c9c1b0b20545e6a9961a7ce3697611885/images/ManagementTools_CloudFormation.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Jiri Pihik" 4 | }, 5 | "name": "cform", 6 | "displayName": "CloudFormation", 7 | "description": "VS Code Plugin for CloudFormation", 8 | "version": "0.0.23", 9 | "publisher": "aws-scripting-guy", 10 | "icon": "images/ManagementTools_CloudFormation.png", 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/aws-scripting-guy/cform-VSCode.git" 14 | }, 15 | "engines": { 16 | "vscode": "^0.10.1" 17 | }, 18 | "categories": [ 19 | "Snippets" 20 | ], 21 | "contributes": { 22 | "languages": [ 23 | { 24 | "id": "json", 25 | "aliases": [ 26 | "JSON", 27 | "json" 28 | ], 29 | "extensions": [ 30 | ".json", 31 | ".cform", 32 | ".template" 33 | ] 34 | }, 35 | { 36 | "id": "yaml", 37 | "aliases": [ 38 | "YAML", 39 | "yaml" 40 | ], 41 | "extensions": [ 42 | ".yaml", 43 | ".yml" 44 | ] 45 | } 46 | ], 47 | "snippets": [ 48 | { 49 | "language": "json", 50 | "path": "./snippets/snippets.json" 51 | }, 52 | { 53 | "language": "yaml", 54 | "path": "./snippets/yaml-snippets.json" 55 | } 56 | ] 57 | }, 58 | "extensionDependencies": [ 59 | "redhat.vscode-yaml" 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /scripts/git-package.ps1: -------------------------------------------------------------------------------- 1 | # Write package.json back to github only for release builds 2 | 3 | write-host "[info] Build reason is: $env:BUILD_REASON " 4 | 5 | if ($env:BUILD_REASON -eq "Schedule" -or $env:BUILD_REASON -eq "Manual") { 6 | # write package.json back to repo 7 | git show 8 | git log --oneline 9 | git push 10 | } 11 | else { 12 | # do nothing 13 | write-host "[info] this is not a scheduled build. Build reason is $env:BUILD_REASON " 14 | } -------------------------------------------------------------------------------- /snippets/snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoscaling-group-vpc": { 3 | "prefix": "autoscaling-group-vpc", 4 | "body": "\r\n\"${1:-}\" : {\r\n \"Type\" : \"AWS::AutoScaling::AutoScalingGroup\",\r\n \"Properties\" : {\r\n \"AvailabilityZones\" : [\r\n ${2:azs}\r\n ],\r\n \"LaunchConfigurationName\" : ${3:\"-\"},\r\n \"MaxSize\" : \"${4:-}\",\r\n \"MinSize\" : \"${5:-}\",\r\n \"VPCZoneIdentifier\" : [ ${6:list of subnet ids} ],\r\n \"Tags\" : [ {\"Key\" : \"Name\",\r\n \"Value\" : \"${7:-}\",\r\n \"PropagateAtLaunch\" : \"True\"} \r\n ]\r\n }\r\n}\r\n", 5 | "description": "", 6 | "scope": "source.cloudformation" 7 | }, 8 | "autoscaling-group": { 9 | "prefix": "autoscaling-group", 10 | "body": "\r\n\"${1:-}\" : {\r\n \"Type\" : \"AWS::AutoScaling::AutoScalingGroup\",\r\n \"Properties\" : {\r\n \"AvailabilityZones\" : [${2:\"--\"}],\r\n \"LaunchConfigurationName\" : ${3:\"--\"},\r\n \"MaxSize\" : \"${4:--}\",\r\n \"MinSize\" : \"${5:--}\",\r\n \"Tags\" : [ {\"Key\" : \"Name\",\r\n \"Value\" : \"${6:\"--\"}\",\r\n \"PropagateAtLaunch\" : \"True\"} \r\n ]\r\n }\r\n}\r\n", 11 | "description": "", 12 | "scope": "source.cloudformation" 13 | }, 14 | "availability-zone": { 15 | "prefix": "availability-zone", 16 | "body": "\r\n{\"Fn::Join\" : [\"\",[{\"Ref\" : \"AWS::Region\"},\"${1:a}\" ] ]}\r\n", 17 | "description": "", 18 | "scope": "source.cloudformation" 19 | }, 20 | "cloudformation-authentication": { 21 | "prefix": "cloudformation-authentication", 22 | "body": "\r\n\"AWS::CloudFormation::Authentication\": {\r\n \"${1:AccessCreds}\": {\r\n \"type\": \"${2}\",\r\n \"buckets\": [ \"${3}\" ],\r\n \"roleName\": \"${4}\",\r\n \"accessKeyId\": \"${5}\",\r\n \"secretKey\": \"${6}\",\r\n \"uris\": [ \"${7}\" ],\r\n \"username\": \"${8}\",\r\n \"password\": \"${9}\"\r\n }\r\n}\r\n", 23 | "description": "", 24 | "scope": "source.cloudformation" 25 | }, 26 | "cloudformation-customresource": { 27 | "prefix": "cloudformation-customresource", 28 | "body": "\r\n\"${1:customResource}\": {\r\n \"Type\": \"AWS::CloudFormation::CustomResource\",\r\n \"Version\": \"1.0\",\r\n \"Properties\": {\r\n \"ServiceToken\": \"${2}\"\r\n }\r\n} \r\n", 29 | "description": "", 30 | "scope": "source.cloudformation" 31 | }, 32 | "cloudformation-init": { 33 | "prefix": "cloudformation-init", 34 | "body": "\r\n\"AWS::CloudFormation::Init\": {\r\n \"config\": {\r\n \"packages\": {\r\n },\r\n \"groups\": {\r\n },\r\n \"users\": {\r\n },\r\n \"sources\": {\r\n },\r\n \"files\": {\r\n },\r\n \"commands\": {\r\n },\r\n \"services\": {\r\n }\r\n }\r\n}\r\n", 35 | "description": "", 36 | "scope": "source.cloudformation" 37 | }, 38 | "cloudformation-stack": { 39 | "prefix": "cloudformation-stack", 40 | "body": "\r\n\"${1:cloudFormationStack}\": {\r\n \"Type\": \"AWS::CloudFormation::Stack\",\r\n \"Properties\": {\r\n \"NotificationARNs\": [ \"${2}\" ],\r\n \"Parameters\": { ${3} },\r\n \"TemplateURL\": \"${4}\",\r\n \"TimeoutInMinutes\": \"${5}\"\r\n }\r\n}\r\n", 41 | "description": "", 42 | "scope": "source.cloudformation" 43 | }, 44 | "cloudformation-waitcondition": { 45 | "prefix": "cloudformation-waitcondition", 46 | "body": "\r\n\"${1:waitCondition}\": {\r\n \"Type\": \"AWS::CloudFormation::WaitCondition\",\r\n \"Properties\": {\r\n \"Count\": \"${2}\",\r\n \"Handle\": \"${3}\",\r\n \"Timeout\": \"${4}\"\r\n }\r\n}\r\n", 47 | "description": "", 48 | "scope": "source.cloudformation" 49 | }, 50 | "cloudformation-waitconditionhandle": { 51 | "prefix": "cloudformation-waitconditionhandle", 52 | "body": "\r\n\"${1:waitConditionHandle}\": {\r\n \"Type\" : \"AWS::CloudFormation::WaitConditionHandle\",\r\n \"Properties\" : {\r\n }\r\n}\r\n", 53 | "description": "", 54 | "scope": "source.cloudformation" 55 | }, 56 | "cloudfront-distribution": { 57 | "prefix": "cloudfront-distribution", 58 | "body": "\r\n\"${1:cloudfrontDistribution}\": {\r\n \"Type\": \"AWS::CloudFront::Distribution\",\r\n \"Properties\": {\r\n \"DistributionConfig\": ${2}\r\n }\r\n}\r\n", 59 | "description": "", 60 | "scope": "source.cloudformation" 61 | }, 62 | "cloudtrail": { 63 | "prefix": "cloudtrail", 64 | "body": "\r\n\"${1:cloudTrail}\": {\r\n \"Type\": \"AWS::CloudTrail::Trail\",\r\n \"Properties\": {\r\n \"S3BucketName\": \"${2}\",\r\n \"IncludeGlobalServiceEvents\": \"${3:true | false}\",\r\n \"IsLogging\": \"${4:true | false}\",\r\n \"S3KeyPrefix\": \"${5}\",\r\n \"SnsTopicName\": \"${6}\"\r\n }\r\n}\r\n", 65 | "description": "", 66 | "scope": "source.cloudformation" 67 | }, 68 | "cloudwatch-alarm": { 69 | "prefix": "cloudwatch-alarm", 70 | "body": "\r\n\"${1:cloudWatchAlarm}\": {\r\n \"Type\": \"AWS::CloudWatch::Alarm\",\r\n \"Properties\": {\r\n \"MetricName\": \"${2}\",\r\n \"Namespace\": \"${3}\",\r\n \"ComparisonOperator\": \"${4}\",\r\n \"EvaluationPeriods\": \"${5}\",\r\n \"Period\": \"${6}\",\r\n \"Statistic\": \"${7}\",\r\n \"Threshold\": \"${8}\",\r\n \"ActionsEnabled\": \"${9:true | false}\",\r\n \"AlarmActions\": [ \"${10}\" ],\r\n \"AlarmDescription\": \"${11}\",\r\n \"AlarmName\": \"${12}\",\r\n \"Dimensions\": [ \"${13}\" ],\r\n \"InsufficientDataActions\": [ \"${14}\" ],\r\n \"OKActions\": [ \"${15}\" ],\r\n \"Unit\": \"${16}\"\r\n }\r\n}\r\n", 71 | "description": "", 72 | "scope": "source.cloudformation" 73 | }, 74 | "cloudwatch-events-eventrule": { 75 | "prefix": "cloudwatch-events-eventrule", 76 | "body": [ 77 | "\"${1:eventRule}\": {", 78 | " \"Type\":\"AWS::Events::Rule\",", 79 | "\t\"Properties\":{", 80 | "\t\t\"Description\" : \"${2:--}\",", 81 | "\t\t\"EventPattern\":{", 82 | "\t\t\t\"source\": [", 83 | "\t\t\t\t\"${3:aws.ec2}\"", 84 | "\t\t\t],", 85 | "\t\t\t\"detail-type\": [", 86 | "\t\t\t\t\"${4:EC2 Instance State-change Notification}\"", 87 | "\t\t\t],", 88 | "\t\t\t\"detail\": {", 89 | "\t\t\t\t\"state\": [", 90 | "\t\t\t\t\t\"${5:stopping}\"", 91 | "\t\t\t\t]", 92 | "\t\t\t},", 93 | "\t\t\"State\": \"ENABLED\",", 94 | "\t\t\"Targets\": [{", 95 | "\t\t\t\t\"Arn\": \"${6:--}\",", 96 | "\t\t\t\t\"Id\": \"${7:--}\"", 97 | "\t\t }]", 98 | "\t\t}", 99 | "\t}", 100 | "},", 101 | "\"${8:permissionForEventsToInvokeLambda}\": {", 102 | "\t\"Type\": \"AWS::Lambda::Permission\",", 103 | "\t\"Properties\": {", 104 | "\t\t\"FunctionName\": \"${9:--}\",", 105 | "\t\t\"Action\": \"${10:lambda:InvokeFunction}\",", 106 | "\t\t\"Principal\": \"${11:events.amazonaws.com}\",", 107 | "\t\t\"SourceArn\": ${12:{ \"Fn::GetAtt\": [\"eventRule\", \"Arn\"] }}", 108 | "\t}", 109 | "}" 110 | ], 111 | "description": "", 112 | "scope": "source.cloudformation" 113 | }, 114 | "codecommit-repository": { 115 | "prefix": "codecommit-repository", 116 | "body": "\r\n\"${1:codeCommitRepository}\": {\r\n \"Type\": \"AWS::CodeCommit::Repository\",\r\n \"Properties\": {\r\n \"RepositoryDescription\": \"${2}\",\r\n \"RepositoryName\": \"${3}\",\r\n \"Triggers\": [ \"${4}\" ],\r\n }\r\n}\r\n", 117 | "description": "", 118 | "scope": "source.cloudformation" 119 | }, 120 | "dynamodb-table": { 121 | "prefix": "dynamodb-table", 122 | "body": "\r\n\"${1:dynamodbTable}\": {\r\n \"Type\": \"AWS::DynamoDB::Table\",\r\n \"Properties\": {\r\n \"AttributeDefinitions\": [ ${2} ],\r\n \"GlobalSecondaryIndexes\": [ ${3} ],\r\n \"KeySchema\": [ ${4} ],\r\n \"LocalSecondaryIndexes\": [ ${5} ],\r\n \"ProvisionedThroughput\": { ${6} },\r\n \"TableName\": \"${7}\"\r\n }\r\n}\r\n", 123 | "description": "", 124 | "scope": "source.cloudformation" 125 | }, 126 | "ec2-instance": { 127 | "prefix": "ec2-instance", 128 | "body": "\r\n\"${1:-}\": {\r\n \"Type\": \"AWS::EC2::Instance\",\r\n \"Properties\": {\r\n \"KeyName\": ${2:-},\r\n \"DisableApiTermination\": \"${3:-}\",\r\n \"ImageId\": { ${4:-} },\r\n \"InstanceType\": \"${5:-}\",\r\n \"Monitoring\": \"${6:true|false}\",\r\n \"SecurityGroupIds\" : [${7:-}],\r\n \"Tags\": [\r\n {\r\n \"Key\": \"${8:-}\",\r\n \"Value\": \"${9:-}\"\r\n }\r\n ],\r\n \"UserData\": {\r\n \"Fn::Base64\": {\r\n \"Fn::Join\": [\r\n \"\",\r\n [\r\n \"#!/bin/bash -ex\",\r\n \"${10:-}\"\r\n ]\r\n ]\r\n }\r\n }\r\n}\r\n }", 129 | "description": "", 130 | "scope": "source.cloudformation" 131 | }, 132 | "ec2-volume": { 133 | "prefix": "ec2-volume", 134 | "body": "\r\n\"${1:ec2Volume}\": {\r\n \"Type\": \"AWS::EC2::Volume\",\r\n \"Properties\": {\r\n \"AutoEnableIO\": \"${2:true|false}\",\r\n \"AvailabilityZone\": \"${3:-}\",\r\n \"Encrypted\": \"${4:true|false}\",\r\n \"KmsKeyId\": \"${5:-}\",\r\n \"Size\": \"${6:-}\",\r\n \"SnapshotId\": \"${7:snap-}\",\r\n \"Tags\": [\r\n {\r\n \"Key\": \"${8:-}\",\r\n \"Value\": \"${9:-}\"\r\n }\r\n ],\r\n \"VolumeType\" : \"${10:standard|io1|gp2}\"\r\n }\r\n}\r\n", 135 | "description": "", 136 | "scope": "source.cloudformation" 137 | }, 138 | "eip-vpc": { 139 | "prefix": "eip-vpc", 140 | "body": "\r\n\"${1:eipName}\": {\r\n \"Type\": \"AWS::EC2::EIP\",\r\n \"Properties\": {\r\n \"Domain\": \"vpc\",\r\n \"InstanceId\": ${2:\"--\"}\r\n }\r\n}\r\n", 141 | "description": "", 142 | "scope": "source.cloudformation" 143 | }, 144 | "elastic-load-balancer-vpc-internal": { 145 | "prefix": "elastic-load-balancer-vpc-internal", 146 | "body": "\r\n\"${1:-}\": {\r\n \"Type\": \"AWS::ElasticLoadBalancing::LoadBalancer\",\r\n \"Properties\": {\r\n \"Listeners\" : [ ${2:-} ],\r\n \"Scheme\" : \"internal\",\r\n \"SecurityGroups\" : [ ${3:-} ],\r\n \"Subnets\" : [ ${4:-} ],\r\n \"Tags\": [\r\n {\r\n \"Key\": \"${5:-}\",\r\n \"Value\": \"${6:-}\"\r\n }\r\n ]\r\n }\r\n}", 147 | "description": "", 148 | "scope": "source.cloudformation" 149 | }, 150 | "elastic-load-balancer-vpc": { 151 | "prefix": "elastic-load-balancer-vpc", 152 | "body": "\r\n\"${1:-}\": {\r\n \"Type\": \"AWS::ElasticLoadBalancing::LoadBalancer\",\r\n \"Properties\": {\r\n \"Listeners\" : [ ${2:-} ],\r\n \"SecurityGroups\" : [ ${3:-} ],\r\n \"Subnets\" : [ ${4:-} ],\r\n \"Tags\": [\r\n {\r\n \"Key\": \"${5:-}\",\r\n \"Value\": \"${6:-}\"\r\n }\r\n ]\r\n }\r\n}", 153 | "description": "", 154 | "scope": "source.cloudformation" 155 | }, 156 | "elastic-load-balancer": { 157 | "prefix": "elastic-load-balancer", 158 | "body": "\r\n\"${1:-}\": {\r\n \"Type\": \"AWS::ElasticLoadBalancing::LoadBalancer\",\r\n \"Properties\": {\r\n \"AvailabilityZones\" : [ \"${2:-}\" ],\r\n \"Listeners\" : [ ${3:-} ],\r\n \"Tags\": [\r\n {\r\n \"Key\": \"${4:-}\",\r\n \"Value\": \"${5:-}\"\r\n }\r\n ]\r\n }\r\n}", 159 | "description": "", 160 | "scope": "source.cloudformation" 161 | }, 162 | "elasticache-cachecluster": { 163 | "prefix": "elasticache-cachecluster", 164 | "body": "\r\n\"${1:elasticacheCacheCluster}\": {\r\n \"Type\": \"AWS::ElastiCache::CacheCluster\",\r\n \"Properties\":\r\n {\r\n \"AutoMinorVersionUpgrade\": \"${2:true | false}\",\r\n \"AZMode\": \"${3}\",\r\n \"CacheNodeType\": \"${4}\",\r\n \"CacheParameterGroupName\": \"${5}\",\r\n \"CacheSecurityGroupNames\": [ \"${6}\" ],\r\n \"CacheSubnetGroupName\": \"${7}\",\r\n \"ClusterName\": \"${8}\",\r\n \"Engine\": \"${9}\",\r\n \"EngineVersion\": \"${10}\",\r\n \"NotificationTopicArn\": \"${11}\",\r\n \"NumCacheNodes\": \"${12}\",\r\n \"Port\": \"${13}\",\r\n \"PreferredAvailabilityZone\": \"${14}\",\r\n \"PreferredAvailabilityZones\": [ \"${15}\" ],\r\n \"PreferredMaintenanceWindow\": \"${16}\",\r\n \"SnapshotArns\": [\"${17}\" ],\r\n \"SnapshotRetentionLimit\": \"${18}\",\r\n \"SnapshotWindow\": \"${19}\",\r\n \"VpcSecurityGroupIds\": [ \"${20}\" ]\r\n }\r\n}\r\n", 165 | "description": "", 166 | "scope": "source.cloudformation" 167 | }, 168 | "elasticache-parametergroup": { 169 | "prefix": "elasticache-parametergroup", 170 | "body": "\r\n\"${1:elastiicacheParameterGroup}\": {\r\n \"Type\": \"AWS::ElastiCache::ParameterGroup\",\r\n \"Properties\": {\r\n \"CacheParameterGroupFamily\": \"${2}\",\r\n \"Description\": \"${3}\",\r\n \"Properties\": { \"${4}\": \"${5}\" }\r\n }\r\n}\r\n", 171 | "description": "", 172 | "scope": "source.cloudformation" 173 | }, 174 | "elasticache-securitygroup": { 175 | "prefix": "elasticache-securitygroup", 176 | "body": "\r\n\"${1:elasticacheSecurityGroup}\": {\r\n \"Type\": \"AWS::ElastiCache::SecurityGroup\",\r\n \"Properties\":\r\n {\r\n \"Description\": \"${2}\"\r\n }\r\n}\r\n", 177 | "description": "", 178 | "scope": "source.cloudformation" 179 | }, 180 | "elasticache-securitygroupingress": { 181 | "prefix": "elasticache-securitygroupingress", 182 | "body": "\r\n\"${1:elasticacheSecurityGroupIngress}\": {\r\n \"Type\": \"AWS::ElastiCache::SecurityGroupIngress\",\r\n \"Properties\":\r\n {\r\n \"CacheSecurityGroupName\": \"${2}\",\r\n \"EC2SecurityGroupName\": \"${3}\",\r\n \"EC2SecurityGroupOwnerId\": \"${4}\"\r\n }\r\n}\r\n", 183 | "description": "", 184 | "scope": "source.cloudformation" 185 | }, 186 | "elasticache-subnetgroup": { 187 | "prefix": "elasticache-subnetgroup", 188 | "body": "\r\n\"${1:elasticacheSubnetGroup}\": {\r\n \"Type\": \"AWS::ElastiCache::SubnetGroup\",\r\n \"Properties\": {\r\n \"Description\": \"${2}\",\r\n \"SubnetIds\": [ \"${3}\" ]\r\n }\r\n}\r\n", 189 | "description": "", 190 | "scope": "source.cloudformation" 191 | }, 192 | "elasticbeanstalk-application": { 193 | "prefix": "elasticbeanstalk-application", 194 | "body": "\r\n\"${1:elasticbeanstalkApplication}\": {\r\n \"Type\": \"AWS::ElasticBeanstalk::Application\",\r\n \"Properties\": {\r\n \"ApplicationName\": \"${2}\",\r\n \"Description\": \"${3}\"\r\n }\r\n}\r\n", 195 | "description": "", 196 | "scope": "source.cloudformation" 197 | }, 198 | "elasticbeanstalk-applicationversion": { 199 | "prefix": "elasticbeanstalk-applicationversion", 200 | "body": "\r\n\"${1:elasticbeanstalkApplicationVersion}\": {\r\n \"Type\": \"AWS::ElasticBeanstalk::ApplicationVersion\",\r\n \"Properties\": {\r\n \"ApplicationName\": \"${2}\",\r\n \"Description\": \"${3}\",\r\n \"SourceBundle\": { ${4} }\r\n }\r\n}\r\n", 201 | "description": "", 202 | "scope": "source.cloudformation" 203 | }, 204 | "elasticbeanstalk-configurationtemplate": { 205 | "prefix": "elasticbeanstalk-configurationtemplate", 206 | "body": "\r\n\"${1:elasticbeanstalkConfigurationTemplate}\": {\r\n \"Type\": \"AWS::ElasticBeanstalk::ConfigurationTemplate\",\r\n \"Properties\": { \r\n \"ApplicationName\": \"${2}\",\r\n \"Description\": \"${3}\",\r\n \"EnvironmentId\": \"${4}\",\r\n \"OptionSettings\": [ ${5} ],\r\n \"SolutionStackName\": \"${6}\",\r\n \"SourceConfiguration\": ${7}\r\n } \r\n}\r\n", 207 | "description": "", 208 | "scope": "source.cloudformation" 209 | }, 210 | "elasticbeanstalk-environment": { 211 | "prefix": "elasticbeanstalk-environment", 212 | "body": "\r\n\"${1:elasticbeanstalkEnvironment}\": {\r\n \"Type\": \"AWS::ElasticBeanstalk::Environment\",\r\n \"Properties\": {\r\n \"ApplicationName\": \"${2}\",\r\n \"CNAMEPrefix\": \"${3}\",\r\n \"Description\": \"${4}\",\r\n \"EnvironmentName\": \"${5}\",\r\n \"OptionSettings\": [ ${6} ],\r\n \"SolutionStackName\": \"${7}\",\r\n \"TemplateName\": \"${8}\",\r\n \"Tier\": \"${9}\",\r\n \"VersionLabel\": \"${10}\"\r\n }\r\n}\r\n", 213 | "description": "", 214 | "scope": "source.cloudformation" 215 | }, 216 | "elb-listener": { 217 | "prefix": "elb-listener", 218 | "body": "\r\n{\r\n \"InstancePort\" : \"${1:-}\",\r\n \"InstanceProtocol\" : \"${2:HTTP|HTTPS|TCP|SSL}\",\r\n \"LoadBalancerPort\" : \"${3:-}\",\r\n \"Protocol\" : \"${4:HTTP|HTTPS|TCP|SSL}\"\r\n}", 219 | "description": "", 220 | "scope": "source.cloudformation" 221 | }, 222 | "find-in-map": { 223 | "prefix": "find-in-map", 224 | "body": "\r\n\"Fn::FindInMap\": [\r\n \"${1:map}\",\r\n \"${2:selector}\",\r\n \"${3:value}\"\r\n]\r\n", 225 | "description": "", 226 | "scope": "source.cloudformation" 227 | }, 228 | "get-attr": { 229 | "prefix": "get-attr", 230 | "body": "\r\n{ \"Fn::GetAtt\" : [ \"${1:logicalNameOfResource}\", \"${2:attributeName}\" ]}\r\n", 231 | "description": "", 232 | "scope": "source.cloudformation" 233 | }, 234 | "iam-accesskey": { 235 | "prefix": "iam-accesskey", 236 | "body": "\r\n\"${1:iamAccessKey}\": {\r\n \"Type\": \"AWS::IAM::AccessKey\",\r\n \"Properties\": {\r\n \"Status\": \"${2}\",\r\n \"UserName\": \"${3}\",\r\n \"Serial\": \"${4}\"\r\n }\r\n}\r\n", 237 | "description": "", 238 | "scope": "source.cloudformation" 239 | }, 240 | "iam-group": { 241 | "prefix": "iam-group", 242 | "body": "\r\n\"${1:iamGroup}\": {\r\n \"Type\": \"AWS::IAM::Group\",\r\n \"Properties\": {\r\n \"Path\": \"${2}\",\r\n \"Policies\": [ \"${3}\" ]\r\n }\r\n}\r\n", 243 | "description": "", 244 | "scope": "source.cloudformation" 245 | }, 246 | "iam-instanceprofile": { 247 | "prefix": "iam-instanceprofile", 248 | "body": "\r\n\"${1:iamInstanceProfile}\": {\r\n \"Type\": \"AWS::IAM::InstanceProfile\",\r\n \"Properties\": {\r\n \"Path\": \"${2:/}\",\r\n \"Roles\": [ \"${3}\" ]\r\n }\r\n}\r\n", 249 | "description": "", 250 | "scope": "source.cloudformation" 251 | }, 252 | "iam-policy": { 253 | "prefix": "iam-policy", 254 | "body": "\r\n\"${1:iamPolicy}\": {\r\n \"Type\": \"AWS::IAM::Policy\",\r\n \"Properties\": {\r\n \"Groups\" : [ \"${2}\" ],\r\n \"PolicyDocument\" : {${3}},\r\n \"PolicyName\" : \"${4}\",\r\n \"Roles\" : [ \"${5}\" ],\r\n \"Users\" : [ \"${6}\" ]\r\n }\r\n}\r\n", 255 | "description": "", 256 | "scope": "source.cloudformation" 257 | }, 258 | "iam-role": { 259 | "prefix": "iam-role", 260 | "body": "\r\n\"${1:iamRole}\": {\r\n \"Type\": \"AWS::IAM::Role\",\r\n \"Properties\": {\r\n \"AssumeRolePolicyDocument\": { ${2} },\r\n \"Path\": \"${3}\",\r\n \"Policies\": [ ${4} ]\r\n }\r\n}\r\n", 261 | "description": "", 262 | "scope": "source.cloudformation" 263 | }, 264 | "iam-user": { 265 | "prefix": "iam-user", 266 | "body": "\r\n\"${1:iamUser}\": {\r\n \"Type\": \"AWS::IAM::User\",\r\n \"Properties\": {\r\n \"Path\": \"${2:/}\",\r\n \"Groups\": [ \"${3}\" ],\r\n \"LoginProfile\": { \"Password\" : \"${4}\" },\r\n \"Policies\": [ ${5} ]\r\n }\r\n}\r\n", 267 | "description": "", 268 | "scope": "source.cloudformation" 269 | }, 270 | "iam-usertogroupaddition": { 271 | "prefix": "iam-usertogroupaddition", 272 | "body": "\r\n\"${1:iamUserToGroupAddition}\": {\r\n \"Type\": \"AWS::IAM::UserToGroupAddition\",\r\n \"Properties\": {\r\n \"GroupName\": \"${2}\",\r\n \"Users\": [ \"${3}\" ]\r\n }\r\n}\r\n", 273 | "description": "", 274 | "scope": "source.cloudformation" 275 | }, 276 | "if": { 277 | "prefix": "if", 278 | "body": [ 279 | "", 280 | "{\"Fn::If\":[", 281 | " ${1:condition_name},", 282 | " ${2:value_if_true},", 283 | " ${3:value_if_false}", 284 | " ]", 285 | "}" 286 | ], 287 | "description": "Intrinsic Function - If", 288 | "scope": "source.cloudformation" 289 | }, 290 | "internet-gateway": { 291 | "prefix": "internet-gateway", 292 | "body": "\r\n\"${1:igwName}\": {\r\n \"Type\": \"AWS::EC2::InternetGateway\",\r\n \"Properties\": {\r\n \"Tags\": [${2:\"-\"}]\r\n }\r\n},\r\n\"AttachGateway\": {\r\n \"Type\": \"AWS::EC2::VPCGatewayAttachment\",\r\n \"Properties\": {\r\n \"VpcId\": ${3:\"--\"},\r\n \"InternetGatewayId\": { \"Ref\": \"${4:igwName}\" }\r\n }\r\n}\r\n", 293 | "description": "", 294 | "scope": "source.cloudformation" 295 | }, 296 | "join": { 297 | "prefix": "join", 298 | "body": "\r\n{\"Fn::Join\" : [\"\",[ ${1:\"prefix\"}, ${2:\"suffix\"} ] ]}\r\n", 299 | "description": "", 300 | "scope": "source.cloudformation" 301 | }, 302 | "kinesis-stream": { 303 | "prefix": "kinesis-stream", 304 | "body": "\r\n\"${1:kinesisStream}\": {\r\n \"Type\": \"AWS::Kinesis::Stream\",\r\n \"Properties\": {\r\n \"ShardCount\": \"${2}\"\r\n }\r\n}\r\n", 305 | "description": "", 306 | "scope": "source.cloudformation" 307 | }, 308 | "lambda-alias": { 309 | "prefix": "lambda-alias", 310 | "body": "\r\n\"${1:lambdaAlias}\": {\r\n \"Type\": \"AWS::Lambda::Alias\",\r\n \"Properties\": {\r\n \"FunctionName\": \"${2}\",\r\n \"FunctionVersion\": \"${3}\",\r\n \"Name\": \"${4}\",\r\n \"Description\": \"${5}\"\r\n }\r\n}\r\n", 311 | "description": "", 312 | "scope": "source.cloudformation" 313 | }, 314 | "lambda-function": { 315 | "prefix": "lambda-function", 316 | "body": "\r\n\"${1:lambdaFunction}\": {\r\n \"Type\": \"AWS::Lambda::Function\",\r\n \"Properties\": {\r\n \"Code\": {\r\n \"S3Bucket\": \"${2}\",\r\n \"S3Key\": \"${3}\",\r\n \"S3ObjectVersion\": \"${4}\",\r\n \"ZipFile\": \"${5}\"\r\n },\r\n \"Handler\": \"${6}\",\r\n \"Role\": \"${7}\",\r\n \"Runtime\": \"${8}\",\r\n \"FunctionName\": \"${9}\",\r\n \"MemorySize\": ${10:128},\r\n \"Timeout\": ${11:5},\r\n \"KmsKeyArn\": \"${12}\",\r\n \"Environment\": {\r\n \"Variables\": {\r\n \"\":\"\",\r\n \"\":\"\"\r\n }\r\n },\r\n \"VpcConfig\": {\r\n \"SecurityGroupIds\": [ ],\r\n \"SubnetIds\": [ ]\r\n },\r\n \"Description\": \"${13}\"\r\n }\r\n}\r\n", 317 | "description": "", 318 | "scope": "source.cloudformation" 319 | }, 320 | "lambda-permission": { 321 | "prefix": "lambda-permission", 322 | "body": "\r\n\"${1:lambdaPermission}\": {\r\n \"Type\": \"AWS::Lambda::Permission\",\r\n \"Properties\": {\r\n \"Action\": \"${2}\",\r\n \"FunctionName\": \"${3}\",\r\n \"Principal\": \"${4}\",\r\n \"SourceAccount\": \"${5}\",\r\n \"SourceArn\": \"${6}\"\r\n }\r\n}\r\n", 323 | "description": "", 324 | "scope": "source.cloudformation" 325 | }, 326 | "lambda-version": { 327 | "prefix": "lambda-version", 328 | "body": "\r\n\"${1:lambdaVersion}\": {\r\n \"Type\": \"AWS::Lambda::Version\",\r\n \"Properties\": {\r\n \"CodeSha256\": \"${2}\",\r\n \"Description\": \"${3}\",\r\n \"FunctionName\": \"${4}\"\r\n }\r\n}\r\n", 329 | "description": "", 330 | "scope": "source.cloudformation" 331 | }, 332 | "launch-config": { 333 | "prefix": "launch-config", 334 | "body": "\r\n\"${1:launchConfigName}\": {\r\n \"Type\" : \"AWS::AutoScaling::LaunchConfiguration\",\r\n \"Properties\" : {\r\n \"IamInstanceProfile\" : ${2:\"--\"},\r\n \"ImageId\" : ${3:\"--\"},\r\n \"InstanceMonitoring\" : ${4:\"--\"},\r\n \"InstanceType\" : \"${5:--}\",\r\n \"KeyName\" : ${6:\"--\"},\r\n \"SecurityGroups\" : [ ${7:\"--\"} ],\r\n \"UserData\" : {\r\n \"Fn::Base64\": \r\n { \"Fn::Join\": [\r\n \"\",\r\n [\r\n \"#!/bin/bash -ex\",\r\n \"${8:-}\"\r\n ]\r\n \r\n ] \r\n }\r\n }\r\n }\r\n}\r\n", 335 | "description": "", 336 | "scope": "source.cloudformation" 337 | }, 338 | "launch-template": { 339 | "prefix": "launch-template", 340 | "body": [ 341 | "\"${1:launchTemplate\"}:{", 342 | " \"Type\":\"AWS::EC2::LaunchTemplate\",", 343 | "\t\"Properties\":{", 344 | "\t\t\"LaunchTemplateName\" : ${2:\"--\"},", 345 | "\t\t\"LaunchTemplateData\" : ${3:\"--\"}", 346 | "\t}", 347 | "}" 348 | ] 349 | }, 350 | "logs-loggroup": { 351 | "prefix": "logs-loggroup", 352 | "body": "\r\n\"${1:logLogGroup}\": {\r\n \"Type\": \"AWS::Logs::LogGroup\",\r\n \"Properties\": {\r\n \"RetentionInDays\": \"${2}\"\r\n }\r\n}\r\n", 353 | "description": "", 354 | "scope": "source.cloudformation" 355 | }, 356 | "logs-metricfilter": { 357 | "prefix": "logs-metricfilter", 358 | "body": "\r\n\"${1:logsMetricFilter}\": {\r\n \"Type\": \"AWS::Logs::MetricFilter\", \r\n \"Properties\": {\r\n \"FilterPattern\": [ \"${2}\" ],\r\n \"LogGroupName\": \"${3}\",\r\n \"MetricTransformations\": [ ${4} ]\r\n }\r\n}\r\n", 359 | "description": "", 360 | "scope": "source.cloudformation" 361 | }, 362 | "map-item": { 363 | "prefix": "map-item", 364 | "body": "\r\n\"${1:selector}\": {\r\n\"${2:key}\": \"${3:val}\"\r\n}\r\n", 365 | "description": "", 366 | "scope": "source.cloudformation" 367 | }, 368 | "map": { 369 | "prefix": "map", 370 | "body": "\r\n\"${1:mapName}\": {\r\n \"${2:selector}\": {\r\n \"${3:key}\": \"${4:val}\"\r\n },\r\n \"${5:selector}\": {\r\n \"${6:key}\": \"${7:val}\"\r\n }\r\n}\r\n", 371 | "description": "", 372 | "scope": "source.cloudformation" 373 | }, 374 | "opsworks-app": { 375 | "prefix": "opsworks-app", 376 | "body": "\r\n\"${1:opsworksApp}\": {\r\n \"Type\": \"AWS::OpsWorks::App\",\r\n \"Properties\": {\r\n \t\"Name\": \"${2}\",\r\n \"StackId\": \"${3}\",\r\n \"Type\": \"${4}\",\r\n \"AppSource\": { ${5} },\r\n \"Attributes\": { ${6}:${7} },\r\n \"Description\": \"${8}\",\r\n \"Domains\": [ \"${9}\" ],\r\n \"EnableSsl\": \"${10:true | false}\",\r\n \"Shortname\": \"${11}\",\r\n \"SslConfiguration\": { ${12} }\r\n }\r\n}\r\n", 377 | "description": "", 378 | "scope": "source.cloudformation" 379 | }, 380 | "opsworks-elasticloadbalancerattachment": { 381 | "prefix": "opsworks-elasticloadbalancerattachment", 382 | "body": "\r\n\"${1:opsworksElasticLoadBalancerAttachment}\": {\r\n \"Type\": \"AWS::OpsWorks::ElasticLoadBalancerAttachment\",\r\n \"Properties\": {\r\n \"ElasticLoadBalancerName\": \"${2}\",\r\n \"LayerId\": \"${3}\"\r\n }\r\n}\r\n", 383 | "description": "", 384 | "scope": "source.cloudformation" 385 | }, 386 | "opsworks-instance": { 387 | "prefix": "opsworks-instance", 388 | "body": "\r\n\"${1:opsworksInstance}\": {\r\n \"Type\": \"AWS::OpsWorks::Instance\",\r\n \"Properties\": {\r\n \"InstanceType\": \"${2}\",\r\n \"LayerIds\": [ \"${3}\" ],\r\n \"StackId\": \"${4}\",\r\n \"AmiId\": \"${5}\",\r\n \"Architecture\": \"${6}\",\r\n \"AutoScalingType\": \"${7}\",\r\n \"AvailabilityZone\": \"${8}\",\r\n \"InstallUpdatesOnBoot\": \"${9:true | false}\",\r\n \"Os\": \"${10}\",\r\n \"RootDeviceType\": \"${11}\",\r\n \"SshKeyName\": \"${12}\",\r\n \"SubnetId\": \"${13}\",\r\n \"TimeBasedAutoScaling\": { ${14} }\r\n }\r\n}\r\n", 389 | "description": "", 390 | "scope": "source.cloudformation" 391 | }, 392 | "opsworks-layer": { 393 | "prefix": "opsworks-layer", 394 | "body": "\r\n\"${1:opsworksLayer}\": {\r\n \"Type\": \"AWS::OpsWorks::Layer\",\r\n \"Properties\": {\r\n \t\"AutoAssignElasticIps\": \"${2:true | false}\",\r\n \"AutoAssignPublicIps\": \"${3:true | false}\",\r\n \"EnableAutoHealing\": \"${4:true | false}\",\r\n \"Name\": \"${5}\",\r\n \"Shortname\": \"${6}\",\r\n \"StackId\": \"${7}\",\r\n \"Type\": \"${8}\",\r\n \"Attributes\": { \"${9}\":\"${10}\" },\r\n \"CustomInstanceProfileArn\": \"${11}\",\r\n \"CustomRecipes\": ${12},\r\n \"CustomSecurityGroupIds\": [ \"${13}\" ],\r\n \"InstallUpdatesOnBoot\": \"${14:true | false}\",\r\n \"LoadBasedAutoScaling\": { ${15} },\r\n \"Packages\": [ \"${16}\" ],\r\n \"VolumeConfigurations\": [ ${17} ]\r\n }\r\n}\r\n", 395 | "description": "", 396 | "scope": "source.cloudformation" 397 | }, 398 | "opsworks-stack": { 399 | "prefix": "opsworks-stack", 400 | "body": "\r\n\"${1:opsworksStack}\": {\r\n \"Type\": \"AWS::OpsWorks::Stack\",\r\n \"Properties\": {\r\n \"DefaultInstanceProfileArn\": \"${2}\",\r\n \"Name\": \"${3}\",\r\n \"ServiceRoleArn\": \"${4}\",\r\n \"Attributes\": { \"${5}\":\"${6}\" },\r\n \"ChefConfiguration\": { ${7} },\r\n \"ConfigurationManager\": { ${8} },\r\n \"CustomCookbooksSource\": { ${9} },\r\n \"CustomJson\": { ${10} },\r\n \"DefaultAvailabilityZone\": \"${11}\",\r\n \"DefaultOs\": \"${12}\",\r\n \"DefaultRootDeviceType\": \"${13}\",\r\n \"DefaultSshKeyName\": \"${14}\",\r\n \"DefaultSubnetId\": \"${15}\",\r\n \"HostnameTheme\": \"${16}\",\r\n \"UseCustomCookbooks\": \"${17:true | false}\",\r\n \"UseOpsworksSecurityGroups\": \"${18:true | false}\",\r\n \"VpcId\": \"${19}\"\r\n }\r\n}\r\n", 401 | "description": "", 402 | "scope": "source.cloudformation" 403 | }, 404 | "output": { 405 | "prefix": "output", 406 | "body": "\r\n\"${1:name}\" : {\r\n \"Value\" : ${2:-}\r\n}\r\n", 407 | "description": "", 408 | "scope": "source.cloudformation" 409 | }, 410 | "parameter-type-availabilityzone-name-list": { 411 | "prefix": "parameter-type-availabilityzone-name-list", 412 | "body": "\r\nList\r\n", 413 | "description": "", 414 | "scope": "source.cloudformation" 415 | }, 416 | "parameter-type-availabilityzone-name": { 417 | "prefix": "parameter-type-availabilityzone-name", 418 | "body": "\r\nAWS::EC2::AvailabilityZone::Name\r\n", 419 | "description": "", 420 | "scope": "source.cloudformation" 421 | }, 422 | "parameter-type-ec2-image-id-list": { 423 | "prefix": "parameter-type-ec2-image-id-list", 424 | "body": "\r\nList\r\n", 425 | "description": "", 426 | "scope": "source.cloudformation" 427 | }, 428 | "parameter-type-ec2-image-id": { 429 | "prefix": "parameter-type-ec2-image-id", 430 | "body": "\r\nAWS::EC2::Image::Id\r\n", 431 | "description": "", 432 | "scope": "source.cloudformation" 433 | }, 434 | "parameter-type-ec2-instance-id-list": { 435 | "prefix": "parameter-type-ec2-instance-id-list", 436 | "body": "\r\nList\r\n", 437 | "description": "", 438 | "scope": "source.cloudformation" 439 | }, 440 | "parameter-type-ec2-instance-id": { 441 | "prefix": "parameter-type-ec2-instance-id", 442 | "body": "\r\nAWS::EC2::Instance::Id\r\n", 443 | "description": "", 444 | "scope": "source.cloudformation" 445 | }, 446 | "parameter-type-ec2-security-group-name-list": { 447 | "prefix": "parameter-type-ec2-security-group-name-list", 448 | "body": "\r\nList\r\n", 449 | "description": "", 450 | "scope": "source.cloudformation" 451 | }, 452 | "parameter-type-ec2-security-group-name": { 453 | "prefix": "parameter-type-ec2-security-group-name", 454 | "body": "\r\nAWS::EC2::SecurityGroup::GroupName\r\n", 455 | "description": "", 456 | "scope": "source.cloudformation" 457 | }, 458 | "parameter-type-ec2-volume-id-list": { 459 | "prefix": "parameter-type-ec2-volume-id-list", 460 | "body": "\r\nList\r\n", 461 | "description": "", 462 | "scope": "source.cloudformation" 463 | }, 464 | "parameter-type-ec2-volume-id": { 465 | "prefix": "parameter-type-ec2-volume-id", 466 | "body": "\r\nAWS::EC2::Volume::Id\r\n", 467 | "description": "", 468 | "scope": "source.cloudformation" 469 | }, 470 | "parameter-type-keypair-keyname": { 471 | "prefix": "parameter-type-keypair-keyname", 472 | "body": "\r\nAWS::EC2::KeyPair::KeyName\r\n", 473 | "description": "", 474 | "scope": "source.cloudformation" 475 | }, 476 | "parameter-type-route53-hostedzone-id-list": { 477 | "prefix": "parameter-type-route53-hostedzone-id-list", 478 | "body": "\r\nList\r\n", 479 | "description": "", 480 | "scope": "source.cloudformation" 481 | }, 482 | "parameter-type-route53-hostedzone-id": { 483 | "prefix": "parameter-type-route53-hostedzone-id", 484 | "body": "\r\nAWS::Route53::HostedZone::Id\r\n", 485 | "description": "", 486 | "scope": "source.cloudformation" 487 | }, 488 | "parameter-type-securitygroup-id-list": { 489 | "prefix": "parameter-type-securitygroup-id-list", 490 | "body": "\r\nList\r\n", 491 | "description": "", 492 | "scope": "source.cloudformation" 493 | }, 494 | "parameter-type-securitygroup-id": { 495 | "prefix": "parameter-type-securitygroup-id", 496 | "body": "\r\nAWS::EC2::SecurityGroup::Id\r\n", 497 | "description": "", 498 | "scope": "source.cloudformation" 499 | }, 500 | "parameter-type-subnet-id-list": { 501 | "prefix": "parameter-type-subnet-id-list", 502 | "body": "\r\nList\r\n", 503 | "description": "", 504 | "scope": "source.cloudformation" 505 | }, 506 | "parameter-type-subnet-id": { 507 | "prefix": "parameter-type-subnet-id", 508 | "body": "\r\nAWS::EC2::Subnet::Id\r\n", 509 | "description": "", 510 | "scope": "source.cloudformation" 511 | }, 512 | "parameter-type-vpc-id-list": { 513 | "prefix": "parameter-type-vpc-id-list", 514 | "body": "\r\nList\r\n", 515 | "description": "", 516 | "scope": "source.cloudformation" 517 | }, 518 | "parameter-type-vpc-id": { 519 | "prefix": "parameter-type-vpc-id", 520 | "body": "\r\nAWS::EC2::VPC::Id\r\n", 521 | "description": "", 522 | "scope": "source.cloudformation" 523 | }, 524 | "parameter": { 525 | "prefix": "parameter", 526 | "body": "\r\n\"${1:paramName}\": {\r\n \"Description\": \"${2:-}\",\r\n \"Type\": \"${3:[String|Number|CommaDelimitedList]}\",\r\n \"Default\": \"${4:-}\"\r\n}\r\n", 527 | "description": "", 528 | "scope": "source.cloudformation" 529 | }, 530 | "rds-dbinstance": { 531 | "prefix": "rds-dbinstance", 532 | "body": "\r\n\"${1:rdsDBInstance}\": {\r\n \"Type\": \"AWS::RDS::DBInstance\",\r\n \"Properties\": {\r\n \"AllocatedStorage\": \"${2}\",\r\n \"DBInstanceClass\": \"${3}\",\r\n \"AllowMajorVersionUpgrade\": \"${4:true | false}\",\r\n \"AutoMinorVersionUpgrade\": \"${5:true | false}\",\r\n \"AvailabilityZone\": \"${6}\",\r\n \"BackupRetentionPeriod\": \"${7}\",\r\n \"CharacterSetName\": \"${8}\",\r\n \"DBInstanceIdentifier\": \"${9}\",\r\n \"DBName\": \"${10}\",\r\n \"DBParameterGroupName\": \"${11}\",\r\n \"DBSecurityGroups\": [ \"${12}\" ],\r\n \"DBSnapshotIdentifier\": \"${13}\",\r\n \"DBSubnetGroupName\": \"${14}\",\r\n \"Engine\": \"${15}\",\r\n \"EngineVersion\": \"${16}\",\r\n \"Iops\": \"${17}\",\r\n \"KmsKeyId\": \"${18}\",\r\n \"LicenseModel\": \"${19}\",\r\n \"MasterUsername\": \"${20}\",\r\n \"MasterUserPassword\": \"${21}\",\r\n \"MultiAZ\": \"${22:true | false}\",\r\n \"OptionGroupName\": \"${23}\",\r\n \"Port\": \"${24}\",\r\n \"PreferredBackupWindow\": \"${25}\",\r\n \"PreferredMaintenanceWindow\": \"${26}\",\r\n \"PubliclyAccessible\": \"${27:true | false}\",\r\n \"SourceDBInstanceIdentifier\": \"${28}\",\r\n \"StorageEncrypted\": \"${29:true | false}\",\r\n \"StorageType\": \"${30}\",\r\n \"Tags\": [ ${31} ],\r\n \"VPCSecurityGroups\": [ \"${32}\" ]\r\n }\r\n}\r\n", 533 | "description": "", 534 | "scope": "source.cloudformation" 535 | }, 536 | "rds-dbparametergroup": { 537 | "prefix": "rds-dbparametergroup", 538 | "body": "\r\n\"${1:rdsDBParameterGroup}\": {\r\n \"Type\": \"AWS::RDS::DBParameterGroup\",\r\n \"Properties\": {\r\n \"Description\": \"${2}\",\r\n \"Family\": \"${3}\",\r\n \"Parameters\": {${4}},\r\n \"Tags\": [ ${5} ]\r\n }\r\n}\r\n", 539 | "description": "", 540 | "scope": "source.cloudformation" 541 | }, 542 | "rds-dbsecuritygroup": { 543 | "prefix": "rds-dbsecuritygroup", 544 | "body": "\r\n\"${1:rdsDBSecurityGroup}\": {\r\n \"Type\": \"AWS::RDS::DBSecurityGroup\",\r\n \"Properties\": {\r\n \"EC2VpcId\": { ${2} },\r\n \"DBSecurityGroupIngress\": [ ${3} ],\r\n \"GroupDescription\": \"${4}\",\r\n \"Tags\": [ ${5} ]\r\n }\r\n}\r\n", 545 | "description": "", 546 | "scope": "source.cloudformation" 547 | }, 548 | "rds-dbsecuritygroupingress": { 549 | "prefix": "rds-dbsecuritygroupingress", 550 | "body": "\r\n{\r\n \"CIDRIP\": \"${1}\",\r\n \"DBSecurityGroupName\": \"${2}\",\r\n \"EC2SecurityGroupId\": \"${3}\",\r\n \"EC2SecurityGroupName\": \"${4}\",\r\n \"EC2SecurityGroupOwnerId\": \"${5}\"\r\n}\r\n", 551 | "description": "", 552 | "scope": "source.cloudformation" 553 | }, 554 | "rds-dbsubnetgroup": { 555 | "prefix": "rds-dbsubnetgroup", 556 | "body": "\r\n\"${1:rdsDBSubnetGroup}\": {\r\n \"Type\": \"AWS::RDS::DBSubnetGroup\",\r\n \"Properties\": {\r\n \"DBSubnetGroupDescription\": \"${2}\",\r\n \"SubnetIds\": [ \"${3}\" ],\r\n \"Tags\": [ ${4} ]\r\n }\r\n}\r\n", 557 | "description": "", 558 | "scope": "source.cloudformation" 559 | }, 560 | "rds-eventsubscription": { 561 | "prefix": "rds-eventsubscription", 562 | "body": "\r\n\"${1:rdsEventSubscription}\": {\r\n \"Type\": \"AWS::RDS::EventSubscription\",\r\n \"Properties\": {\r\n \"Enabled\": \"${2:true | false}\",\r\n \"EventCategories\": [ \"${3}\" ],\r\n \"SnsTopicArn\": \"${4}\",\r\n \"SourceIds\": [ \"${5}\" ],\r\n \"SourceType \": \"${6}\"\r\n }\r\n}\r\n", 563 | "description": "", 564 | "scope": "source.cloudformation" 565 | }, 566 | "redshift-cluster": { 567 | "prefix": "redshift-cluster", 568 | "body": "\r\n\"${1:redshiftCluster}\": {\r\n \"Type\": \"AWS::Redshift::Cluster\",\r\n \"Properties\": {\r\n \"AllowVersionUpgrade\": \"${2:true | false}\",\r\n \"AutomatedSnapshotRetentionPeriod\": \"${3}\",\r\n \"AvailabilityZone\": \"${4}\",\r\n \"ClusterParameterGroupName\": \"${5}\",\r\n \"ClusterSecurityGroups\": [ \"${6}\" ],\r\n \"ClusterSubnetGroupName\": \"${7}\",\r\n \"ClusterType\": \"${8}\",\r\n \"ClusterVersion\": \"${9}\",\r\n \"DBName\": \"${10}\",\r\n \"ElasticIp\": \"${11}\",\r\n \"Encrypted\": \"${12:true | false}\",\r\n \"HsmClientCertificateIdentifier\": \"${13}\",\r\n \"HsmConfigurationIdentifier\": \"${14}\",\r\n \"MasterUsername\": \"${15}\",\r\n \"MasterUserPassword\": \"${16}\",\r\n \"NodeType\": \"${17}\",\r\n \"NumberOfNodes\": \"${18}\",\r\n \"OwnerAccount\": \"${19}\",\r\n \"Port\": \"${20}\",\r\n \"PreferredMaintenanceWindow\": \"${21}\",\r\n \"PubliclyAccessible\": \"${22:true | false}\",\r\n \"SnapshotClusterIdentifier\": \"${23}\",\r\n \"SnapshotIdentifier\": \"${24}\",\r\n \"VpcSecurityGroupIds\": [ \"${25}\" ]\r\n }\r\n}\r\n", 569 | "description": "", 570 | "scope": "source.cloudformation" 571 | }, 572 | "redshift-clusterparametergroup": { 573 | "prefix": "redshift-clusterparametergroup", 574 | "body": "\r\n\"${1:redshiftClusterParameterGroup}\": {\r\n \"Type\": \"AWS::Redshift::ClusterParameterGroup\",\r\n \"Properties\": {\r\n \"Description\": \"${2}\",\r\n \"ParameterGroupFamily\": \"${3}\",\r\n \"Parameters\": [ ${4} ]\r\n }\r\n}\r\n", 575 | "description": "", 576 | "scope": "source.cloudformation" 577 | }, 578 | "redshift-clustersecuritygroup": { 579 | "prefix": "redshift-clustersecuritygroup", 580 | "body": "\r\n\"${1:redshiftClusterSecurityGroup}\": {\r\n \"Type\": \"AWS::Redshift::ClusterSecurityGroup\",\r\n \"Properties\": {\r\n \"Description\": \"${2}\"\r\n }\r\n}\r\n", 581 | "description": "", 582 | "scope": "source.cloudformation" 583 | }, 584 | "redshift-clustersecuritygroupingress": { 585 | "prefix": "redshift-clustersecuritygroupingress", 586 | "body": "\r\n\"${1:redshiftClusterSecurityGroupIngress}\": {\r\n \"Type\": \"AWS::Redshift::ClusterSecurityGroupIngress\",\r\n \"Properties\": {\r\n \"ClusterSecurityGroupName\": \"${2}\",\r\n \"CIDRIP\": \"${3}\",\r\n \"EC2SecurityGroupName\": \"${4}\",\r\n \"EC2SecurityGroupOwnerId\": \"${5}\"\r\n }\r\n}\r\n", 587 | "description": "", 588 | "scope": "source.cloudformation" 589 | }, 590 | "redshift-clustersubnetgroup": { 591 | "prefix": "redshift-clustersubnetgroup", 592 | "body": "\r\n\"${1:redshiftClusterSubnetGroup}\": {\r\n \"Type\": \"AWS::Redshift::ClusterSubnetGroup\",\r\n \"Properties\": {\r\n \"Description\": \"${2}\",\r\n \"SubnetIds\": [ \"${3}\" ]\r\n }\r\n}\r\n", 593 | "description": "", 594 | "scope": "source.cloudformation" 595 | }, 596 | "ref": { 597 | "prefix": "ref", 598 | "body": "\r\n{ \"Ref\": \"${1:logicalName}\" }\r\n", 599 | "description": "", 600 | "scope": "source.cloudformation" 601 | }, 602 | "resource": { 603 | "prefix": "resource", 604 | "body": "\r\n\"${1:resourceName}\": {\r\n \"Description\": \"${2:-}\",\r\n \"Type\": \"${3:-}\",\r\n \"Properties\": \"${4:-}\"\r\n}\r\n", 605 | "description": "", 606 | "scope": "source.cloudformation" 607 | }, 608 | "route-table-assoc": { 609 | "prefix": "route-table-assoc", 610 | "body": "\r\n\"${1:routeTableAssocName\"}: {\r\n \"Type\": \"AWS::EC2::SubnetRouteTableAssociation\",\r\n \"Properties\": {\r\n \"SubnetId\": ${2:\"--\"},\r\n \"RouteTableId\": ${3:\"--\"}\r\n }\r\n}\r\n", 611 | "description": "", 612 | "scope": "source.cloudformation" 613 | }, 614 | "route-table": { 615 | "prefix": "route-table", 616 | "body": "\r\n\"${1:routeTableName}\": {\r\n \"Type\": \"AWS::EC2::RouteTable\",\r\n \"Properties\": {\r\n \"VpcId\": ${2:\"--\"},\r\n \"Tags\": [${3:\"--\"}]\r\n }\r\n}\r\n", 617 | "description": "", 618 | "scope": "source.cloudformation" 619 | }, 620 | "route": { 621 | "prefix": "route", 622 | "body": "\r\n\"${1:routeName}\": {\r\n \"Type\": \"AWS::EC2::Route\",\r\n \"Properties\": {\r\n \"RouteTableId\": ${2:\"--\"},\r\n \"DestinationCidrBlock\": \"${3:\"--\"},\r\n \"GatewayId\": ${4:\"--\"}\r\n }\r\n}\r\n", 623 | "description": "", 624 | "scope": "source.cloudformation" 625 | }, 626 | "route53-healthcheck": { 627 | "prefix": "route53-healthcheck", 628 | "body": "\r\n\"${1:route53HealthCheck}\": {\r\n \"Type\": \"AWS::Route53::HealthCheck\",\r\n \"Properties\": {\r\n \"HealthCheckConfig\": { ${2} },\r\n \"HealthCheckTags\": [ ${3} ]\r\n }\r\n}\r\n", 629 | "description": "", 630 | "scope": "source.cloudformation" 631 | }, 632 | "route53-hostedzone": { 633 | "prefix": "route53-hostedzone", 634 | "body": "\r\n\"${1}\": {\r\n\t\"Type\": \"AWS::Route53::HostedZone\",\r\n\t\"Properties\": {\r\n\t\t\"Name\": \"{$2}\",\r\n\t\t\"VPCs\": \"{$3}\",\r\n\t\t\"HostedZoneConfig\": {{$4}},\r\n\t\t\"HostedZoneTags\": [{$5}]\r\n\t}\r\n}\r\n\r\n\t", 635 | "description": "", 636 | "scope": "source.cloudformation" 637 | }, 638 | "route53-recordsetgroup": { 639 | "prefix": "route53-recordsetgroup", 640 | "body": "\r\n\"${1:route53RSGroup}\": {\r\n\t\"Type\": \"AWS::Route53::RecordSetGroup\",\r\n\t\"Properties\": {\r\n\t\t\"HostedZoneId\": \"${2}\",\r\n\t\t\"HostedZoneName\": \"${3}\",\r\n\t\t\"RecordSets\": [ {${4}} ],\r\n\t\t\"Comment\": \"${5}\"\r\n }\r\n}\r\n", 641 | "description": "", 642 | "scope": "source.cloudformation" 643 | }, 644 | "route53-recordset": { 645 | "prefix": "route53-recordset", 646 | "body": "\r\n\"${1:route53RS}\": {\r\n\t\"Type\": \"AWS::Route53::RecordSet\",\r\n\t\"Properties\": {\r\n\t\t\"Name\": \"${2}\",\r\n\t\t\"Type\": \"${3:A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT}\",\r\n\t\t\"AliasTarget\": {${4}},\r\n\t\t\"Comment\": \"${5}\",\r\n\t\t\"Failover\": \"${6}\",\r\n\t\t\"GeoLocation\": {${7}},\r\n\t\t\"HealthCheckId\": \"${8}\",\r\n\t\t\"HostedZoneId\": \"${9}\",\r\n\t\t\"HostedZoneName\": \"${10}\",\r\n\t\t\"Region\": \"${11}\",\r\n\t\t\"ResourceRecords\": [ \"${12}\" ],\r\n\t\t\"SetIdentifier\": \"${13}\",\r\n\t\t\"TTL\": \"${14}\",\r\n\t\t\"Weight\": \"${15}\"\r\n\t}\r\n}\r\n", 647 | "description": "", 648 | "scope": "source.cloudformation" 649 | }, 650 | "s3-bucket": { 651 | "prefix": "s3-bucket", 652 | "body": "\r\n\"${1:s3Bucket}\": {\r\n\t\"Type\": \"AWS::S3::Bucket\",\r\n\t\"Properties\": {\r\n\t\t\"AccessControl\": \"${2:Private | PublicRead | PublicReadWrite | AuthenticatedRead | LogDeliveryWrite | BucketOwnerRead | BucketOwnerFullControl}\",\r\n\t\t\"BucketName\": \"${3}\",\r\n\t\t\"CorsConfiguration\": {${4}},\r\n\t\t\"LifecycleConfiguration\": {${5}},\r\n\t\t\"NotificationConfiguration\": {${6}},\r\n\t\t\"VersioningConfiguration\": {${7}},\r\n\t\t\"WebsiteConfiguration\": {${8}},\r\n\t\t\"Tags\": [${9}] \r\n\t}\r\n}\r\n", 653 | "description": "", 654 | "scope": "source.cloudformation" 655 | }, 656 | "s3-bucketpolicy": { 657 | "prefix": "s3-bucketpolicy", 658 | "body": "\r\n\"${1:s3BucketPolicy}\": {\r\n\t\"Type\": \"AWS::S3::BucketPolicy\",\r\n\t\"Properties\": {\r\n\t\t\"Bucket\" : \"${2}\",\r\n\t\t\"PolicyDocument\" : {${3}}\r\n\t}\r\n}\r\n", 659 | "description": "", 660 | "scope": "source.cloudformation" 661 | }, 662 | "security-group-egress-block": { 663 | "prefix": "security-group-egress-block", 664 | "body": "\r\n\"SecurityGroupEgress\" : [ \r\n ${1:--insert rules--}\r\n]\r\n", 665 | "description": "", 666 | "scope": "source.cloudformation" 667 | }, 668 | "security-group": { 669 | "prefix": "security-group", 670 | "body": "\r\n\"${1:secGroupName}\" : {\r\n \"Type\" : \"AWS::EC2::SecurityGroup\",\r\n \"Properties\" : {\r\n \"GroupDescription\" : \"${2:-}\",\r\n \"SecurityGroupIngress\" : [ \r\n ${3:--insert rules--}\r\n ],\r\n \"VpcId\" : ${4:ref-to-vpc},\r\n \"Tags\" : [ ${5:insert tag} ]\r\n }\r\n}\r\n", 671 | "description": "", 672 | "scope": "source.cloudformation" 673 | }, 674 | "select-list": { 675 | "prefix": "select-list", 676 | "body": "\r\n{ \"Fn::Select\" : [ ${1:0|1|etc}, {\"Ref\": \"${2:list_name}\"} ] }\r\n", 677 | "description": "", 678 | "scope": "source.cloudformation" 679 | }, 680 | "security-group-egress-cidr": { 681 | "prefix": "security-group-egress-cidr", 682 | "body": "\r\n{ \"IpProtocol\" : \"${1:[tcp|udp|ip]}\", \"FromPort\" : \"${2:-}\", \"ToPort\" : \"${3:-}\", \"CidrIp\" : \"${4:-}\" }\r\n", 683 | "description": "", 684 | "scope": "source.cloudformation" 685 | }, 686 | "security-group-ingress-cidr": { 687 | "prefix": "security-group-ingress-cidr", 688 | "body": "\r\n{ \"IpProtocol\" : \"${1:[tcp|udp|ip]}\", \"FromPort\" : \"${2:-}\", \"ToPort\" : \"${3:-}\", \"CidrIp\" : \"${4:-}\" }\r\n", 689 | "description": "", 690 | "scope": "source.cloudformation" 691 | }, 692 | "sns-subscription": { 693 | "prefix": "sns-subscription", 694 | "body": "\r\n${$1:sns-subscription}: {\r\n \"Type\": \"AWS::SNS::Subscription\",\r\n \"Properties\": {\r\n \"TopicArn\": \"arn:aws:sns:[Region]:[AccountID]:[TopicName]\",\r\n \"Protocol\": \"http | https | email | email-json | sms | sqs | application | lambda\",\r\n \"Endpoint\": \"\",\r\n \"Region\": \"\",\r\n \"DeliveryPolicy\": \"\",\r\n \"FilterPolicy\": \"\",\r\n \"RawMessageDelivery\": \"\"\r\n }\r\n}\r\n\r\n", 695 | "description": "", 696 | "scope": "source.cloudformation" 697 | }, 698 | "sns-topic": { 699 | "prefix": "sns-topic", 700 | "body": "\r\n\"${1:snsTopic}\": {\r\n \"Type\": \"AWS::SNS::Topic\",\r\n \"Properties\": {\r\n \"DisplayName\": \"${2}\",\r\n \"Subscription\": [ ${3} ],\r\n \"TopicName\": \"${4}\"\r\n }\r\n}\r\n", 701 | "description": "", 702 | "scope": "source.cloudformation" 703 | }, 704 | "sns-topicpolicy": { 705 | "prefix": "sns-topicpolicy", 706 | "body": "\r\n\"${1:snsTopicPolicy}\": {\r\n \"Type\": \"AWS::SNS::TopicPolicy\",\r\n \"Properties\":\r\n {\r\n \"PolicyDocument\": {${2}},\r\n \"Topics\": [ {${3}} ]\r\n }\r\n}\r\n", 707 | "description": "", 708 | "scope": "source.cloudformation" 709 | }, 710 | "sqs-queue": { 711 | "prefix": "sqs-queue", 712 | "body": "\r\n\"${1:sqsQueue}\": {\r\n \"Type\": \"AWS::SQS::Queue\",\r\n \"Properties\": {\r\n \"DelaySeconds\": \"${2}\",\r\n \"MaximumMessageSize\": \"${3}\",\r\n \"MessageRetentionPeriod\": \"${4}\",\r\n \"QueueName\": \"${5}\",\r\n \"ReceiveMessageWaitTimeSeconds\": \"${6}\",\r\n \"RedrivePolicy\": {${7}},\r\n \"VisibilityTimeout\": \"${8}\"\r\n }\r\n}\r\n", 713 | "description": "", 714 | "scope": "source.cloudformation" 715 | }, 716 | "sqs-queuepolicy": { 717 | "prefix": "sqs-queuepolicy", 718 | "body": "\r\n\"${1:sqsQueuePolicy}\": {\r\n \"Type\": \"AWS::SQS::QueuePolicy\",\r\n \"Properties\": {\r\n \"PolicyDocument\": {${2}},\r\n \"Queues\": [ ${3} ]\r\n }\r\n}\r\n", 719 | "description": "", 720 | "scope": "source.cloudformation" 721 | }, 722 | "start": { 723 | "prefix": "start", 724 | "body": "{\r\n\"AWSTemplateFormatVersion\": \"2010-09-09\",\r\n \"Description\": \"${1}\",\r\n \"Metadata\": {\r\n\r\n },\r\n \"Parameters\": {\r\n \r\n },\r\n \"Mappings\": {\r\n\r\n },\r\n \"Conditions\": {\r\n\r\n },\r\n \"Resources\": {\r\n\r\n },\r\n \"Outputs\": {\r\n\r\n }\r\n}", 725 | "description": "", 726 | "scope": "source.cloudformation" 727 | }, 728 | "subnet": { 729 | "prefix": "subnet", 730 | "body": "\r\n\"${1:subnetName}\": {\r\n \"Type\": \"AWS::EC2::Subnet\",\r\n \"Properties\": {\r\n \"AvailabilityZone\": ${2:\"-\"},\r\n \"VpcId\": ${3:\"-\"},\r\n \"CidrBlock\": ${4:\"-\"},\r\n \"Tags\": [${5:\"-\"}]\r\n }\r\n}\r\n", 731 | "description": "", 732 | "scope": "source.cloudformation" 733 | }, 734 | "tag": { 735 | "prefix": "tag", 736 | "body": "\r\n\"Tags\":[\r\n{ \"Key\": \"${1:-}\", \"Value\": ${2:\"--\"} }\r\n]", 737 | "description": "", 738 | "scope": "source.cloudformation" 739 | }, 740 | "vpc": { 741 | "prefix": "vpc", 742 | "body": "\r\n\"${1:name}\": {\r\n \"Type\": \"AWS::EC2::VPC\",\r\n \"Properties\": {\r\n \"CidrBlock\": ${2:\"----/--\"},\r\n \"Tags\": [${3:-}]\r\n }\r\n}\r\n", 743 | "description": "", 744 | "scope": "source.cloudformation" 745 | }, 746 | "vpn-gateway": { 747 | "prefix": "vpn-gateway", 748 | "body": "\r\n\"${1:vgwName}\": {\r\n \"Type\": \"AWS::EC2::VPNGateway\",\r\n \"Properties\": {\r\n \"Type\": \"ipsec.1\",\r\n \"Tags\": [${2:\"--\"}]\r\n }\r\n},\r\n\"AttachVpnGateway\": {\r\n \"Type\": \"AWS::EC2::VPCGatewayAttachment\",\r\n \"Properties\": {\r\n \"VpcId\": ${3:\"--\"},\r\n \"VpnGatewayId\": { \"Ref\": \"${4:vgwName}\" }\r\n }\r\n}\r\n", 749 | "description": "", 750 | "scope": "source.cloudformation" 751 | }, 752 | "code-pipeline": { 753 | "prefix": "code-pipeline", 754 | "body": "\r\n\"${1:codepipeline}\": {\r\n \"Type\" : \"AWS::CodePipeline::Pipeline\",\r\n \"Properties\" : {\r\n \"ArtifactStore\": {\r\n \"Type\": \"S3\",\r\n \"Location\": { \"Ref\" : \"s3Bucket\" }\r\n },\r\n \"DisableInboundStageTransitions\" : [ ],\r\n \"Name\" : \"${3:name}\",\r\n \"RestartExecutionOnUpdate\" : ${4:true | false},\r\n \"RoleArn\" : \"${roleArn}\",\r\n \"Stages\" : [ ]\r\n }\r\n}", 755 | "description": "", 756 | "scope": "json" 757 | }, 758 | "code-pipeline-stage": { 759 | "prefix": "code-pipeline-stage", 760 | "body": "{\r\n \"Name\": \"${1:Source}\",\r\n \"Actions\": [\r\n ]\r\n}", 761 | "description": "", 762 | "scope": "json" 763 | }, 764 | "code-pipeline-action": { 765 | "prefix": "code-pipeline-action", 766 | "body": "{\r\n \"ActionTypeId\" : {\r\n \"Category\": \"${1:Source | Build | Deploy | Test | Invoke | Approval}\",\r\n \"Owner\": \"${2:AWS | ThirdParty | Custom}\",\r\n \"Version\": \"1\",\r\n \"Provider\": \"${3:S3|CodeCommit|GitHub|CloudFormation|CodeBuild|CodeDeploy|ElasticBeanstalk|Lambda|ECS|jenkinsProviderName}\"\r\n },\r\n \"Configuration\" : { \"key\" : \"value\" },\r\n \"InputArtifacts\" : [ ],\r\n \"Name\" : \"${4:actionName}\",\r\n \"OutputArtifacts\" : [ ],\r\n \"RoleArn\" : \"\",\r\n \"RunOrder\" : ${5:1|2|3|4}\r\n}", 767 | "description": "", 768 | "scope": "json" 769 | } 770 | } 771 | -------------------------------------------------------------------------------- /snippets/yaml-snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "autoscaling-group-vpc": { 4 | "prefix": "autoscaling-group-vpc", 5 | "body": [ 6 | "${1:myAutoscalingGroup}: ", 7 | " Type: AWS::AutoScaling::AutoScalingGroup", 8 | " Properties:", 9 | " AutoScalingGroupName: ${2:asg}", 10 | " AvailabilityZones: !GetAZs ''", 11 | " LaunchConfigurationName: ${3:!Ref LaunchConfig}", 12 | " LoadBalancerNames:", 13 | " - !Ref ElasticLoadBalancer", 14 | " MaxSize: ${4:0}", 15 | " MinSize: ${5:0}", 16 | " VPCZoneIdentifier: ", 17 | " - ${6:vpc-id}", 18 | " Tags: ", 19 | " - Key: ${7:keyname}", 20 | " Value: ${8:value}", 21 | " PropagateAtLaunch: 'true'" 22 | ], 23 | "description": "", 24 | "scope": "source.cloudformation" 25 | }, 26 | "autoscaling-group": { 27 | "prefix": "autoscaling-group", 28 | "body": [ 29 | "${1:asg}:", 30 | " Type: AWS::AutoScaling::AutoScalingGroup", 31 | " Properties:", 32 | " AvailabilityZones: !GetAZs ''", 33 | " LaunchConfigurationName: ", 34 | " MaxSize: 0", 35 | " MinSize: 0", 36 | " Tags:", 37 | " - Key: keyname", 38 | " Value: value", 39 | " PropagateAtLaunch: True|False" 40 | ], 41 | "description": "", 42 | "scope": "source.cloudformation" 43 | }, 44 | "availability-zone": { 45 | "prefix": "availability-zone", 46 | "body": [ 47 | "!Join", 48 | " - ''", 49 | " - - !Ref 'AWS::Region'", 50 | " - ${1:'a'}" 51 | ], 52 | "description": "", 53 | "scope": "source.cloudformation" 54 | }, 55 | "cloudfront-distribution": { 56 | "prefix": "cloudfront-distribution", 57 | "body": [ 58 | "${1:cloudfrontDistribution}:", 59 | " Type: AWS::CloudFront::Distribution", 60 | " Properties:", 61 | " DistributionConfig:", 62 | " CacheBehaviors:", 63 | " - ", 64 | " ${2:behavior}", 65 | " DefaultCacheBehavior: ${3}", 66 | " IPV6Enabled: ${4:true | false}", 67 | " Origins:", 68 | " - ", 69 | " ${5:origin}", 70 | " Tags:", 71 | " - Key: ${6:key}", 72 | " Value: ${7:value}" 73 | ], 74 | "description": "", 75 | "scope": "source.cloudformation" 76 | }, 77 | "cloudtrail": { 78 | "prefix": "cloudtrail", 79 | "body": [ 80 | "${1:cloudTrail}:", 81 | " Type: AWS::CloudTrail::Trail", 82 | " Properties:", 83 | " S3BucketName: ${2}", 84 | " IncludeGlobalServiceEvents: ${3:true | false}", 85 | " IsLogging: ${4:true | false}", 86 | " S3KeyPrefix: ${5}", 87 | " SnsTopicName: ${6}" 88 | ], 89 | "description": "", 90 | "scope": "source.cloudformation" 91 | }, 92 | "cloudwatch-alarm": { 93 | "prefix": "cloudwatch-alarm", 94 | "body": [ 95 | "${1:cloudWatchAlarm}:", 96 | " Type: AWS::CloudWatch::Alarm", 97 | " Properties:", 98 | " MetricName: ${2}", 99 | " Namespace: ${3}", 100 | " ComparisonOperator: ${4}", 101 | " EvaluationPeriods: ${5}", 102 | " Period: ${6}", 103 | " Statistic: ${7}", 104 | " Threshold: ${8}", 105 | " ActionsEnabled: ${9:true|false}", 106 | " AlarmActions: ${9}", 107 | " AlarmDescription: ${10}", 108 | " AlarmName: ${11}", 109 | " Dimensions: ${12}", 110 | " InsufficientDataActions: ${13}", 111 | " OKActions: ${14}", 112 | " Unit: ${15}" 113 | ], 114 | "description": "", 115 | "scope": "source.cloudformation" 116 | }, 117 | "cloudwatch-events-eventrule": { 118 | "prefix": "cloudwatch-events-eventrule", 119 | "body": [ 120 | "${1:eventRule}:", 121 | " Type: AWS::Events::Rule", 122 | " Properties:", 123 | " Description: ${2}", 124 | " EventPattern:", 125 | " source:", 126 | " - ${3:\"\"} # Example: \"aws.ec2\"", 127 | " detail-type:", 128 | " - ${4:\"\"} # Example: \"EC2 Instance State-change Notification\"", 129 | " detail:", 130 | " state:", 131 | " - ${5:\"\"} # Example: \"stopping\"", 132 | " State: ${6} # Example: \"ENABLED\"}", 133 | " Targets:", 134 | " - ", 135 | " Arn: ${7}", 136 | " Id: ${8}", 137 | " RoleArn: ${9}" 138 | ], 139 | "description": "", 140 | "scope": "source.cloudformation" 141 | }, 142 | "cloudwatch-events-scheduledrule": { 143 | "prefix": "cloudwatch-events-scheduledrule", 144 | "body": [ 145 | "${1:scheduledRule}:", 146 | " Type: AWS::Events::Rule", 147 | " Properties:", 148 | " Description: ${2}", 149 | " ScheduleExpression: \"rate(10 minutes)\"", 150 | " State: ${6} \"ENABLED\"", 151 | " Targets:", 152 | " - ", 153 | " Arn: ${7}", 154 | " Id: ${8}", 155 | " RoleArn: ${9}", 156 | "${10:permissionForEventsToInvokeLambda}:", 157 | " Type: AWS::Lambda::Permission", 158 | " Properties:", 159 | " FunctionName: ${11}", 160 | " Action: ${12} # Example: \"lambda:InvokeFunction\"", 161 | " Principal: ${13} # Example: \"events.amazonaws.com\"", 162 | " SourceArn: ${14}", 163 | " Fn::GetAtt:", 164 | " - \"scheduledRule\"", 165 | " - \"Arn\"" 166 | ], 167 | "description": "", 168 | "scope": "source.cloudformation" 169 | }, 170 | "codecommit-repository": { 171 | "prefix": "codecommit-repository", 172 | "body": [ 173 | "${1:codeCommitRepository}:", 174 | " Type: AWS::CodeCommit::Repository", 175 | " Properties:", 176 | " RepositoryDescription: ${2}", 177 | " RepositoryName: ${3}", 178 | " Triggers:", 179 | " - ${4:trigger}" 180 | ], 181 | "description": "", 182 | "scope": "source.cloudformation" 183 | }, 184 | "dynamodb-table": { 185 | "prefix": "dynamodb-table", 186 | "body": [ 187 | "${1:dynamodbTable}:", 188 | " Type: AWS::DynamoDB::Table", 189 | " Properties:", 190 | " AttributeDefinitions:", 191 | " - ", 192 | " ${2:attribute definition}", 193 | " GlobalSecondaryIndexes:", 194 | " - ", 195 | " ${3:global secondary indexes}", 196 | " LocalSecondaryIndexes:", 197 | " - ", 198 | " ${4:local secondary indexes}", 199 | " KeySchema:", 200 | " - ", 201 | " ${5:key schema}", 202 | " ProvisionedThroughput: ${6}", 203 | " TableName: ${7}", 204 | " Tags:", 205 | " - Key: ${8:key}", 206 | " Value: ${9:value}" 207 | ], 208 | "description": "", 209 | "scope": "source.cloudformation" 210 | }, 211 | "ec2-instance": { 212 | "prefix": "ec2-instance", 213 | "body": [ 214 | "${1:myEC2Instance}:", 215 | " Type: AWS::EC2::Instance", 216 | " Properties:", 217 | " KeyName: ${2}", 218 | " DisableApiTermination: ${3}", 219 | " ImageId: ${4}", 220 | " InstanceType: ${5}", 221 | " Monitoring: ${6:true|false}", 222 | " SecurityGroupIds:", 223 | " - ${7:sg-id}", 224 | " UserData: !Base64 |", 225 | " #!/bin/bash -ex", 226 | " # put your script here", 227 | " Tags:", 228 | " - Key: ${8:key}", 229 | " Value: ${9:value}" 230 | ], 231 | "description": "", 232 | "scope": "source.cloudformation" 233 | }, 234 | "ec2-volume": { 235 | "prefix": "ec2-volume", 236 | "body": [ 237 | "${1:ec2Volume}:", 238 | " Type: AWS::EC2::Volume", 239 | " Properties:", 240 | " AutoEnableIO: ${2:true|false}", 241 | " AvailabilityZone: ${3}", 242 | " Encrypted: ${4:true|false}", 243 | " KmsKeyId: ${5}", 244 | " Size: ${6:0}", 245 | " SnapshotId: ${7:snap-}", 246 | " VolumeType: ${8:standard|io1|gp2}", 247 | " Tags:", 248 | " - Key: ${9:key}", 249 | " Value: ${10:value}" 250 | ], 251 | "description": "", 252 | "scope": "source.cloudformation" 253 | }, 254 | "eip-vpc": { 255 | "prefix": "eip-vpc", 256 | "body": [ 257 | "${1:eipName}:", 258 | " Type: AWS::EC2::EIP", 259 | " Properties:", 260 | " Domain: vpc", 261 | " InstanceId: ${2:instance-id}" 262 | ], 263 | "description": "", 264 | "scope": "source.cloudformation" 265 | }, 266 | "elastic-load-balancer-vpc-internal": { 267 | "prefix": "elastic-load-balancer-vpc-internal", 268 | "body": [ 269 | "${1:myELBname}:", 270 | " Type: AWS::ElasticLoadBalancing::LoadBalancer", 271 | " Properties:", 272 | " Scheme: internal", 273 | " SecurityGroups:", 274 | " - ${2:sg-id}", 275 | " Subnets:", 276 | " - ${3:subnet-id}", 277 | " Instances:", 278 | " - ${4:instance-id}", 279 | " Listeners:", 280 | " - LoadBalancerPort: ${5}", 281 | " InstancePort: ${6}", 282 | " Protocol: ${7:HTTP|HTTPS|TCP|SSL}", 283 | " InstanceProtocol: ${8:HTTP|HTTPS|TCP|SSL}", 284 | " - LoadBalancerPort: ${9:'443'}", 285 | " InstancePort: ${10:'443'}", 286 | " Protocol: ${11:HTTPS}", 287 | " InstanceProtocol: ${12:HTTPS}", 288 | " SSLCertificateId: ${13}", 289 | " HealthCheck:", 290 | " Target: TCP:port or HTTPS|HTTP:port/PathToPing", 291 | " HealthyThreshold: ${14}", 292 | " Interval: ${15}", 293 | " Timeout: ${16}", 294 | " UnhealthyThreshold: ${17}" 295 | ], 296 | "description": "", 297 | "scope": "source.cloudformation" 298 | }, 299 | "elb-listener": { 300 | "prefix": "elb-listener", 301 | "body": [ 302 | "InstancePort: ${1}", 303 | "InstanceProtocol: ${2:HTTP|HTTPS|TCP|SSL}", 304 | "LoadBalancerPort: ${3}", 305 | "Protocol: ${4:HTTP|HTTPS|TCP|SSL}", 306 | "SSLCertificateId: ${5}" 307 | ], 308 | "description": "", 309 | "scope": "source.cloudformation" 310 | }, 311 | "iam-accesskey": { 312 | "prefix": "iam-accesskey", 313 | "body": [ 314 | "${1:iamAccessKey:}", 315 | " Type: AWS::IAM::AccessKey", 316 | " Properties:", 317 | " Status: ${2}", 318 | " UserName: ${3}", 319 | " Serial: ${4}" 320 | ], 321 | "description": "", 322 | "scope": "source.cloudformation" 323 | }, 324 | "iam-group": { 325 | "prefix": "iam-group", 326 | "body": [ 327 | "${1:iamGroup}:", 328 | " Type: AWS::IAM::Group", 329 | " Properties:", 330 | " Path: ${2}", 331 | " Policies:", 332 | " - ${policy}" 333 | ], 334 | "description": "", 335 | "scope": "source.cloudformation" 336 | }, 337 | "iam-instanceprofile": { 338 | "prefix": "iam-instanceprofile", 339 | "body": [ 340 | "${1:iamInstanceProfile}:", 341 | " Type: AWS::IAM::InstanceProfile", 342 | " Properties:", 343 | " Path: ${2:/}", 344 | " Roles:", 345 | " - ${3:rolename}" 346 | ], 347 | "description": "", 348 | "scope": "source.cloudformation" 349 | }, 350 | "iam-policy": { 351 | "prefix": "iam-policy", 352 | "body": [ 353 | "${1:iamPolicy}:", 354 | " Type: AWS::IAM::Policy", 355 | " Properties:", 356 | " PolicyName:${2}", 357 | " Groups:", 358 | " - ${3:group}", 359 | " Roles:", 360 | " - ${4:role}", 361 | " Users:", 362 | " - ${5:user}", 363 | " PolicyDocument: ${6: # policy document - can be JSON or YAML}" 364 | ], 365 | "description": "", 366 | "scope": "source.cloudformation" 367 | }, 368 | "iam-role": { 369 | "prefix": "iam-role", 370 | "body": [ 371 | "${1:iamRole}:", 372 | " Type: AWS::IAM::Role", 373 | " Properties:", 374 | " Path:", 375 | " AssumeRolePolicyDocument: ", 376 | " Policies:", 377 | " - ", 378 | " PolicyName: \"root\"", 379 | " PolicyDocument:", 380 | " Version: \"2012-10-17\"", 381 | " Statement:", 382 | " - ", 383 | " Effect: \"Allow\"", 384 | " Action: \"*\"", 385 | " Resource: \"*\"" 386 | ], 387 | "description": "", 388 | "scope": "source.cloudformation" 389 | }, 390 | "iam-user": { 391 | "prefix": "iam-user", 392 | "body": [ 393 | "${1:iamUser:}", 394 | " Type: AWS::IAM::User", 395 | " Properties:", 396 | " Path: ${2:/}", 397 | " Groups:", 398 | " - ${3:groupname}", 399 | " LoginProfile:", 400 | " Password: ${4}", 401 | " PasswordResetRequired: ${5:true|false}", 402 | " Policies:", 403 | " - ${6:}policyname", 404 | " ManagedPolicyArns:", 405 | " - ${7:managedpolicyarn}" 406 | ], 407 | "description": "", 408 | "scope": "source.cloudformation" 409 | }, 410 | "iam-usertogroupaddition": { 411 | "prefix": "iam-usertogroupaddition", 412 | "body": [ 413 | "${1:iamUserToGroupAddition}:", 414 | " Type: AWS::IAM::UserToGroupAddition", 415 | " Properties:", 416 | " GroupName:${2}", 417 | " Users:", 418 | " - ${3:username}" 419 | ], 420 | "description": "", 421 | "scope": "source.cloudformation" 422 | }, 423 | "internet-gateway": { 424 | "prefix": "internet-gateway", 425 | "body": [ 426 | "${1:igwName}:", 427 | " Type: AWS::EC2::InternetGateway", 428 | " Properties:", 429 | " Tags:", 430 | " - Key: ${2:keyname}", 431 | " Value: ${3:value}", 432 | "${4:AttachGateway}:", 433 | " Type: AWS::EC2::VPCGatewayAttachment", 434 | " Properties:", 435 | " VpcId: ${5:vpc-id}", 436 | " InternetGatewayId: !Ref ${1:igwName}" 437 | ], 438 | "description": "", 439 | "scope": "source.cloudformation" 440 | }, 441 | "kinesis-stream": { 442 | "prefix": "kinesis-stream", 443 | "body": [ 444 | "${1:kinesisStream}:", 445 | " Type: AWS::Kinesis::Stream", 446 | " Properties:", 447 | " Name:${2}", 448 | " RetentionPeriodHours: ${3:0}", 449 | " ShardCount: ${4:0}", 450 | " StreamEncryption:", 451 | " EncryptionType: KMS", 452 | " KeyId: ${5: # The GUID for the customer-managed KMS key to use for encryption}" 453 | ], 454 | "description": "", 455 | "scope": "source.cloudformation" 456 | }, 457 | "lambda-alias": { 458 | "prefix": "lambda-alias", 459 | "body": [ 460 | "${1:lambdaAlias}:", 461 | " Type: AWS::Lambda::Alias", 462 | " Properties:", 463 | " Description:${2}", 464 | " FunctionName:${3: #The version of the Lambda function that you want to associate with this alias.}", 465 | " FunctionVersion:${4}", 466 | " Name:${5: #A name for the alias}" 467 | ], 468 | "description": "", 469 | "scope": "source.cloudformation" 470 | }, 471 | "lambda-function": { 472 | "prefix": "lambda-function", 473 | "body": [ 474 | "${1:lambdaFunction}:", 475 | " Type: AWS::Lambda::Function", 476 | " Properties:", 477 | " Description: ${2}", 478 | " FunctionName: ${3}", 479 | " Handler: ${4}", 480 | " KmsKeyArn: ${5}", 481 | " MemorySize: ${6:128}", 482 | " Role: ${7:role-arn}", 483 | " Runtime: ${8:nodejs | nodejs4.3 | nodejs6.10 | nodejs8.10 | java8 | python2.7 | python3.6 | dotnetcore1.0 | dotnetcore2.0 | dotnetcore2.1 | nodejs4.3-edge | go1.x}", 484 | " Timeout: ${9}", 485 | " VpcConfig:", 486 | " SecurityGroupIds:", 487 | " - ${10:sg-id}", 488 | " SubnetIds:", 489 | " - ${11:subnet-id}", 490 | " Environment:", 491 | " Variables:", 492 | " ${12:key1}: ${13:value1} # A map of key-value pairs that the Lambda function can access", 493 | " Code:", 494 | " S3Bucket: ${14}", 495 | " S3Key: ${15}", 496 | " S3ObjectVersion: ${16}", 497 | " ZipFile: ${17}", 498 | " Tags:", 499 | " - Key: ${18:keyname}", 500 | " Value: ${19:value}" 501 | ], 502 | "description": "", 503 | "scope": "source.cloudformation" 504 | }, 505 | "lambda-permission": { 506 | "prefix": "lambda-permission", 507 | "body": [ 508 | "${1:lambdaPermission}:", 509 | " Type: AWS::Lambda::Permission", 510 | " Properties:", 511 | " Action: ${2}", 512 | " FunctionName: ${3}", 513 | " Principal: ${4}", 514 | " SourceAccount: ${5}", 515 | " SourceArn: ${6}" 516 | ], 517 | "description": "", 518 | "scope": "source.cloudformation" 519 | }, 520 | "lambda-version": { 521 | "prefix": "lambda-version", 522 | "body": [ 523 | "${1:lambdaVersion}:", 524 | " Type: AWS::Lambda::Version", 525 | " Properties:", 526 | " Description: ${2}", 527 | " FunctionName: ${3}", 528 | " CodeSha256: ${4}" 529 | ], 530 | "description": "", 531 | "scope": "source.cloudformation" 532 | }, 533 | "launch-config": { 534 | "prefix": "launch-config", 535 | "body": [ 536 | "${1:launchConfigName}:", 537 | " Type: AWS::AutoScaling::LaunchConfiguration", 538 | " Properties:", 539 | " LaunchConfigurationName: ${2}", 540 | " AssociatePublicIpAddress: ${3:true|false}", 541 | " IamInstanceProfile: ${4:}", 542 | " ImageId: ${5}", 543 | " EbsOptimized: ${6:true|false}", 544 | " InstanceMonitoring: ${7:true|false}", 545 | " InstanceType: ${8}", 546 | " KernelId: ${9}", 547 | " KeyName: ${10}", 548 | " SecurityGroups:", 549 | " - ${11:sg-id}", 550 | " UserData:", 551 | " Fn::Base64: !Sub", 552 | " #!/bin/bash -ex # your script here" 553 | ], 554 | "description": "", 555 | "scope": "source.cloudformation" 556 | }, 557 | "launch-template": { 558 | "prefix": "launch-template", 559 | "body": [ 560 | "${1:launchTemplateName}:", 561 | " Type: AWS::EC2::LaunchTemplate", 562 | " Properties:", 563 | " LaunchTemplateName: ${2}", 564 | " LaunchTemplateData: ${3}" 565 | ] 566 | }, 567 | "logs-loggroup": { 568 | "prefix": "logs-loggroup", 569 | "body": [ 570 | "${1:logLogGroup}:", 571 | " Type: AWS::Logs::LogGroup", 572 | " Properties:", 573 | " RetentionInDays: ${2}", 574 | " LogGroupName: ${3}" 575 | ], 576 | "description": "", 577 | "scope": "source.cloudformation" 578 | }, 579 | "logs-metricfilter": { 580 | "prefix": "logs-metricfilter", 581 | "body": [ 582 | "${1:logsMetricFilter}:", 583 | " Type: AWS::Logs::MetricFilter", 584 | " Properties:", 585 | " FilterPattern: ${2} # Example: [..., request=*.html*, status_code=4*,]", 586 | " LogGroupName: ${3}", 587 | " MetricTransformations:", 588 | " - ", 589 | " MetricValue: ${4} # Example: \"1\"", 590 | " MetricNamespace: ${5} # Example: \"WebServer/404s\"", 591 | " MetricName: ${6} # Example: \"404Count\"" 592 | ], 593 | "description": "", 594 | "scope": "source.cloudformation" 595 | }, 596 | "rds-dbinstance": { 597 | "prefix": "rds-dbinstance", 598 | "body": [ 599 | "${1:rdsDBInstance}:", 600 | " Type: AWS::RDS::DBInstance", 601 | " Properties:", 602 | " AllocatedStorage: ${2}", 603 | " DBInstanceClass: ${3}", 604 | " AllowMajorVersionUpgrade: ${4:true|false}", 605 | " AutoMinorVersionUpgrade: ${5:true|false}", 606 | " AvailabilityZone: ${6}", 607 | " BackupRetentionPeriod: ${7}", 608 | " CharacterSetName: ${8}", 609 | " DBInstanceIdentifier: ${9}", 610 | " DBName: ${10}", 611 | " DBParameterGroupName: ${11}", 612 | " DBSecurityGroups: ", 613 | " - ${12:db-sg-group}", 614 | " DBSnapshotIdentifier: ${13}", 615 | " DBSubnetGroupName: ${14}", 616 | " Engine: ${15:mysql|oracle}", 617 | " EngineVersion: ${16}", 618 | " Iops: ${17}", 619 | " KmsKeyId: ${18}", 620 | " LicenseModel: ${19}", 621 | " MasterUsername: ${20}", 622 | " MasterUserPassword: ${21}", 623 | " MultiAZ: ${22:true|false}", 624 | " OptionGroupName: ${23}", 625 | " Port: ${24}", 626 | " PreferredBackupWindow: ${25}", 627 | " PreferredMaintenanceWindow: ${26}", 628 | " PubliclyAccessible: ${27:true|false}", 629 | " SourceDBInstanceIdentifier: ${28}", 630 | " StorageEncrypted: ${29:true|false}", 631 | " StorageType: ${30}", 632 | " VPCSecurityGroups:", 633 | " - ${31:vpc-sg-id}", 634 | " Tags:", 635 | " - Key: ${32:keyname}", 636 | " Value: ${33:value}" 637 | ], 638 | "description": "", 639 | "scope": "source.cloudformation" 640 | }, 641 | "rds-dbparametergroup": { 642 | "prefix": "rds-dbparametergroup", 643 | "body": [ 644 | "${1:rdsDBParameterGroup}:", 645 | " Type: AWS::RDS::DBParameterGroup", 646 | " Properties:", 647 | " Description: ${2}", 648 | " Family: ${3}", 649 | " Parameters:", 650 | " ${4:key1}: ${5:value1}", 651 | " ${6:key2}: ${7:value2}", 652 | " Tags:", 653 | " - Key: ${8:keyname}", 654 | " Value: ${9:value}" 655 | ], 656 | "description": "", 657 | "scope": "source.cloudformation" 658 | }, 659 | "rds-dbsecuritygroup": { 660 | "prefix": "rds-dbsecuritygroup", 661 | "body": [ 662 | "${1:rdsDBSecurityGroup}:", 663 | " Type: AWS::RDS::DBSecurityGroup", 664 | " Properties:", 665 | " EC2VpcId: ${2}", 666 | " GroupDescription: ${3}", 667 | " DBSecurityGroupIngress:", 668 | " - ", 669 | " CIDRIP: ${4:--.--.--.--/--}", 670 | " DBSecurityGroupName: ${5}", 671 | " EC2SecurityGroupId: ${6}", 672 | " EC2SecurityGroupName: ${7}", 673 | " EC2SecurityGroupOwnerId: ${8}", 674 | " - ", 675 | " ${9: RDS Security Group Rule}", 676 | " Tags:", 677 | " - Key: ${10:keyname}", 678 | " Value: ${11:value}" 679 | ], 680 | "description": "", 681 | "scope": "source.cloudformation" 682 | }, 683 | "rds-dbsecuritygroupingress": { 684 | "prefix": "rds-dbsecuritygroupingress", 685 | "body": [ 686 | "CIDRIP: ${1:--.--.--.--/--}", 687 | "DBSecurityGroupName: ${2}", 688 | "EC2SecurityGroupId: ${3}", 689 | "EC2SecurityGroupName: ${4}", 690 | "EC2SecurityGroupOwnerId: ${5}" 691 | ], 692 | "description": "", 693 | "scope": "source.cloudformation" 694 | }, 695 | "rds-dbsubnetgroup": { 696 | "prefix": "rds-dbsubnetgroup", 697 | "body": [ 698 | "${1:rdsDBSubnetGroup}:", 699 | " Type: AWS::RDS::DBSubnetGroup", 700 | " Properties:", 701 | " DBSubnetGroupDescription: ${2}", 702 | " SubnetIds:", 703 | " - ${3:subnet-id}", 704 | " Tags:", 705 | " - Key: ${4:keyname}", 706 | " Value: ${5:value}" 707 | ], 708 | "description": "", 709 | "scope": "source.cloudformation" 710 | }, 711 | "rds-eventsubscription": { 712 | "prefix": "rds-eventsubscription", 713 | "body": [ 714 | "${1:rdsEventSubscription}:", 715 | "Type: AWS::RDS::EventSubscription", 716 | "Properties:", 717 | " Enabled: ${2:true | false}", 718 | " EventCategories:", 719 | " - ${3:event-category}", 720 | " SnsTopicArn: ${4}", 721 | " SourceIds:", 722 | " - ${5:source-id}", 723 | " SourceType: ${6}" 724 | ], 725 | "description": "", 726 | "scope": "source.cloudformation" 727 | }, 728 | "redshift-cluster": { 729 | "prefix": "redshift-cluster", 730 | "body": [ 731 | "${1:redshiftCluster}:", 732 | " Type: AWS::Redshift::Cluster", 733 | " Properties:", 734 | " AllowVersionUpgrade: ${2:true | false}", 735 | " AutomatedSnapshotRetentionPeriod: ${3}", 736 | " AvailabilityZone: ${4}", 737 | " ClusterParameterGroupName: ${5}", 738 | " ClusterSecurityGroups:", 739 | " - ${6:sg-id}", 740 | " ClusterSubnetGroupName: ${7}", 741 | " ClusterType: ${8}", 742 | " ClusterVersion: ${9}", 743 | " DBName: ${10}", 744 | " ElasticIp: ${11}", 745 | " Encrypted: ${12:true | false}", 746 | " HsmClientCertificateIdentifier: ${13}", 747 | " HsmConfigurationIdentifier: ${14}", 748 | " MasterUsername: ${15}", 749 | " MasterUserPassword: ${16}", 750 | " NodeType: ${17}", 751 | " NumberOfNodes: ${18}", 752 | " OwnerAccount: ${19}", 753 | " Port: ${20}", 754 | " PreferredMaintenanceWindow: ${21}", 755 | " PubliclyAccessible: ${22:true | false}", 756 | " SnapshotClusterIdentifier: ${23}", 757 | " SnapshotIdentifier: ${24}", 758 | " VpcSecurityGroupIds:", 759 | " - ${25:sg-id}" 760 | ], 761 | "description": "", 762 | "scope": "source.cloudformation" 763 | }, 764 | "redshift-clusterparametergroup": { 765 | "prefix": "redshift-clusterparametergroup", 766 | "body": [ 767 | "${1:redshiftClusterParameterGroup}:", 768 | " Type: AWS::Redshift::ClusterParameterGroup", 769 | " Properties:", 770 | " Description: ${2}", 771 | " ParameterGroupFamily: ${3}", 772 | " Parameters:", 773 | " - ${4:parameter}", 774 | " Tags:", 775 | " - Key: ${5:keyname}", 776 | " Value: ${6:value}" 777 | ], 778 | "description": "", 779 | "scope": "source.cloudformation" 780 | }, 781 | "redshift-clustersecuritygroup": { 782 | "prefix": "redshift-clustersecuritygroup", 783 | "body": [ 784 | "${1:redshiftClusterSecurityGroup}:", 785 | " Type: AWS::Redshift::ClusterSecurityGroup", 786 | " Properties:", 787 | " Description: ${2}" 788 | ], 789 | "description": "", 790 | "scope": "source.cloudformation" 791 | }, 792 | "redshift-clustersecuritygroupingress": { 793 | "prefix": "redshift-clustersecuritygroupingress", 794 | "body": [ 795 | "${1:redshiftClusterSecurityGroupIngress}:", 796 | " Type: AWS::Redshift::ClusterSecurityGroupIngress", 797 | " Properties:", 798 | " ClusterSecurityGroupName: ${2}", 799 | " CIDRIP: ${3}", 800 | " EC2SecurityGroupName: ${4}", 801 | " EC2SecurityGroupOwnerId: ${5}" 802 | ], 803 | "description": "", 804 | "scope": "source.cloudformation" 805 | }, 806 | "redshift-clustersubnetgroup": { 807 | "prefix": "redshift-clustersubnetgroup", 808 | "body": [ 809 | "${1:redshiftClusterSubnetGroup}:", 810 | " Type: AWS::Redshift::ClusterSubnetGroup", 811 | " Properties:", 812 | " Description: ${2}", 813 | " SubnetIds:", 814 | " - ${3:subnet-id}" 815 | ], 816 | "description": "", 817 | "scope": "source.cloudformation" 818 | }, 819 | "start": { 820 | "prefix": "start", 821 | "body": [ 822 | "AWSTemplateFormatVersion: 2010-09-09", 823 | "Description: ${1:---}", 824 | "Metadata: ${2}", 825 | "\r", 826 | "Parameters: ${3}", 827 | "\r", 828 | "Mappings: ${4}", 829 | "\r", 830 | "Conditions: ${5}", 831 | "\r", 832 | "Resources: ${6}", 833 | "\r", 834 | "Outputs:" 835 | ] 836 | }, 837 | "find-in-map": { 838 | "prefix": "find-in-map", 839 | "body": [ 840 | "!FindInMap [ MappingName, keyname, value ]" 841 | ], 842 | "description": "!FindInMap [ MappingName, keyname, value ]", 843 | "scope": "source.cloudformation" 844 | }, 845 | "get-attr": { 846 | "prefix": "get-attr", 847 | "body": "!GetAtt logicalNameOfResource.attributeName", 848 | "description": "", 849 | "scope": "source.cloudformation" 850 | }, 851 | "get-azs": { 852 | "prefix": "get-azs", 853 | "body": "!GetAZs ''", 854 | "description": "", 855 | "scope": "source.cloudformation" 856 | }, 857 | "if": { 858 | "prefix": "if", 859 | "body": [ 860 | "!If [condition_name, value_if_true, value_if_false]" 861 | ], 862 | "description": "Intrinsic Function - If", 863 | "scope": "source.cloudformation" 864 | }, 865 | "ref": { 866 | "prefix": "ref", 867 | "body": "!Ref logicalName", 868 | "description": "", 869 | "scope": "source.cloudformation" 870 | }, 871 | "parameter-type-availabilityzone-name-list": { 872 | "prefix": "parameter-type-availabilityzone-name-list", 873 | "body": [ 874 | "${1:paramName}:", 875 | " Description: ${2}", 876 | " Type: List", 877 | " Default: ${3}" 878 | ] 879 | }, 880 | "parameter-type-availabilityzone-name": { 881 | "prefix": "parameter-type-availabilityzone-name", 882 | "body": [ 883 | "${1:paramName}:", 884 | " Description: ${2}", 885 | " Type: AWS::EC2::AvailabilityZone::Name", 886 | " Default: ${3}" 887 | ] 888 | }, 889 | "parameter-type-ec2-image-id-list": { 890 | "prefix": "parameter-type-ec2-image-id-list", 891 | "body": [ 892 | "${1:paramName}:", 893 | " Description: ${2}", 894 | " Type: List", 895 | " Default: ${3}" 896 | ] 897 | }, 898 | "parameter-type-ec2-image-id": { 899 | "prefix": "parameter-type-ec2-image-id", 900 | "body": [ 901 | "${1:paramName}:", 902 | " Description: ${2}", 903 | " Type: AWS::EC2::Image::Id", 904 | " Default: ${3}" 905 | ] 906 | }, 907 | "parameter-type-ec2-instance-id-list": { 908 | "prefix": "parameter-type-ec2-instance-id-list", 909 | "body": [ 910 | "${1:paramName}:", 911 | " Description: ${2}", 912 | " Type: List", 913 | " Default: ${3}" 914 | ] 915 | }, 916 | "parameter-type-ec2-instance-id": { 917 | "prefix": "parameter-type-ec2-instance-id", 918 | "body": [ 919 | "${1:paramName}:", 920 | " Description: ${2}", 921 | " Type: AWS::EC2::Instance::Id", 922 | " Default: ${3}" 923 | ] 924 | }, 925 | "parameter-type-ec2-security-group-name-list": { 926 | "prefix": "parameter-type-ec2-security-group-name-list", 927 | "body": [ 928 | "${1:paramName}:", 929 | " Description: ${2}", 930 | " Type: List", 931 | " Default: ${3}" 932 | ] 933 | }, 934 | "parameter-type-ec2-security-group-name": { 935 | "prefix": "parameter-type-ec2-security-group-name", 936 | "body": [ 937 | "${1:paramName}:", 938 | " Description: ${2}", 939 | " Type: AWS::EC2::SecurityGroup::GroupName", 940 | " Default: ${3}" 941 | ] 942 | }, 943 | "parameter-type-ec2-volume-id-list": { 944 | "prefix": "parameter-type-ec2-volume-id-list", 945 | "body": [ 946 | "${1:paramName}:", 947 | " Description: ${2}", 948 | " Type: List", 949 | " Default: ${3}" 950 | ] 951 | }, 952 | "parameter-type-ec2-volume-id": { 953 | "prefix": "parameter-type-ec2-volume-id", 954 | "body": [ 955 | "${1:paramName}:", 956 | " Description: ${2}", 957 | " Type: AWS::EC2::Volume::Id", 958 | " Default: ${3}" 959 | ] 960 | }, 961 | "parameter-type-keypair-keyname": { 962 | "prefix": "parameter-type-keypair-keyname", 963 | "body": [ 964 | "${1:paramName}:", 965 | " Description: ${2}", 966 | " Type: AWS::EC2::KeyPair::KeyName", 967 | " Default: ${3}" 968 | ] 969 | }, 970 | "parameter-type-route53-hostedzone-id-list": { 971 | "prefix": "parameter-type-route53-hostedzone-id-list", 972 | "body": [ 973 | "${1:paramName}:", 974 | " Description: ${2}", 975 | " Type: List", 976 | " Default: ${3}" 977 | ] 978 | }, 979 | "parameter-type-route53-hostedzone-id": { 980 | "prefix": "parameter-type-route53-hostedzone-id", 981 | "body": [ 982 | "${1:paramName}:", 983 | " Description: ${2}", 984 | " Type: AWS::Route53::HostedZone::Id", 985 | " Default: ${3}" 986 | ] 987 | }, 988 | "parameter-type-securitygroup-id-list": { 989 | "prefix": "parameter-type-securitygroup-id-list", 990 | "body": [ 991 | "${1:paramName}:", 992 | " Description: ${2}", 993 | " Type: List", 994 | " Default: ${3}" 995 | ] 996 | }, 997 | "parameter-type-securitygroup-id": { 998 | "prefix": "parameter-type-securitygroup-id", 999 | "body": [ 1000 | "${1:paramName}:", 1001 | " Description: ${2}", 1002 | " Type: AWS::EC2::SecurityGroup::Id", 1003 | " Default: ${3}" 1004 | ] 1005 | }, 1006 | "parameter-type-subnet-id-list": { 1007 | "prefix": "parameter-type-subnet-id-list", 1008 | "body": [ 1009 | "${1:paramName}:", 1010 | " Description: ${2}", 1011 | " Type: List", 1012 | " Default: ${3}" 1013 | ] 1014 | }, 1015 | "parameter-type-subnet-id": { 1016 | "prefix": "parameter-type-subnet-id", 1017 | "body": [ 1018 | "${1:paramName}:", 1019 | " Description: ${2}", 1020 | " Type: AWS::EC2::Subnet::Id", 1021 | " Default: ${3}" 1022 | ] 1023 | }, 1024 | "parameter-type-vpc-id-list": { 1025 | "prefix": "parameter-type-vpc-id-list", 1026 | "body": [ 1027 | "${1:paramName}:", 1028 | " Description: ${2}", 1029 | " Type: List", 1030 | " Default: ${3}" 1031 | ] 1032 | }, 1033 | "parameter-type-vpc-id": { 1034 | "prefix": "parameter-type-vpc-id", 1035 | "body": [ 1036 | "${1:paramName}:", 1037 | " Description: ${2}", 1038 | " Type: AWS::EC2::VPC::Id", 1039 | " Default: ${3}" 1040 | ] 1041 | }, 1042 | "parameter": { 1043 | "prefix": "parameter", 1044 | "body": [ 1045 | "${1:paramName}:", 1046 | " Description: ", 1047 | " Type: ${3:String|Number|CommaDelimitedList}", 1048 | " Default: ${4:-}" 1049 | ], 1050 | "description": "", 1051 | "scope": "source.cloudformation" 1052 | }, 1053 | "output": { 1054 | "prefix": "output", 1055 | "body": [ 1056 | "${1:LogicalID}:", 1057 | " Description: ${2:Information about the value}", 1058 | " Value:", 1059 | " Export: ", 1060 | " Name:" 1061 | ], 1062 | "description": "", 1063 | "scope": "source.cloudformation" 1064 | }, 1065 | "tag": { 1066 | "prefix": "tag", 1067 | "body": [ 1068 | "Key: ${1:keyname}", 1069 | "Value: ${2:value}" 1070 | ] 1071 | }, 1072 | "map": { 1073 | "prefix": "map", 1074 | "body": [ 1075 | "${1:mapName}:", 1076 | " ${2:mapping01}:", 1077 | " ${3:key01}:", 1078 | " Name: ${4:value01}", 1079 | " ${5:mapping02}:", 1080 | " ${6:key02}:", 1081 | " Name: ${7:value02}" 1082 | ], 1083 | "description": "", 1084 | "scope": "source.cloudformation" 1085 | }, 1086 | "route-table-assoc": { 1087 | "prefix": "route-table-assoc", 1088 | "body": [ 1089 | "${1:routeTableAssocName}:", 1090 | " Type: AWS::EC2::SubnetRouteTableAssociation", 1091 | " Properties:", 1092 | " SubnetId: ${2:subnet-id}", 1093 | " RouteTableId: ${3:rtable-id}" 1094 | ], 1095 | "description": "", 1096 | "scope": "source.cloudformation" 1097 | }, 1098 | "route-table": { 1099 | "prefix": "route-table", 1100 | "body": [ 1101 | "${1:routeTableName}:", 1102 | " Type: AWS::EC2::RouteTable", 1103 | " Properties:", 1104 | " VpcId: ${2:vpc-id}", 1105 | " Tags:", 1106 | " - Key: ${3:keyname}", 1107 | " Value: ${4:value}" 1108 | ], 1109 | "description": "", 1110 | "scope": "source.cloudformation" 1111 | }, 1112 | "route": { 1113 | "prefix": "route", 1114 | "body": [ 1115 | "${1:routeName}:", 1116 | " Type: AWS::EC2::Route", 1117 | " Properties:", 1118 | " RouteTableId: ${2:rtable-id}", 1119 | " DestinationCidrBlock: ${3:--.--.--.--/--}", 1120 | " GatewayId: ${4:gataway-id}" 1121 | ], 1122 | "description": "", 1123 | "scope": "source.cloudformation" 1124 | }, 1125 | "route53-healthcheck": { 1126 | "prefix": "route53-healthcheck", 1127 | "body": [ 1128 | "${1:route53HealthCheck}:", 1129 | " Type: AWS::Route53::HealthCheck", 1130 | " Properties:", 1131 | " HealthCheckConfig:", 1132 | " IPAddress: ${2:'000.000.000.000'}", 1133 | " Port: ${3:'80'}", 1134 | " Type: ${4:HTTP}", 1135 | " ResourcePath: ${5:'/example/index.html'}", 1136 | " FullyQualifiedDomainName: ${6:'example.com'}", 1137 | " RequestInterval: ${7:'30'}", 1138 | " FailureThreshold: ${8:'3'}", 1139 | " HealthCheckTags:", 1140 | " - ", 1141 | " Key: ${9:\"SampleKey1\"}", 1142 | " Value: ${10:\"SampleValue1\"}", 1143 | " - ", 1144 | " Key: ${11:\"SampleKey2\"}", 1145 | " Value: ${12:\"SampleValue2\"}" 1146 | ], 1147 | "description": "", 1148 | "scope": "source.cloudformation" 1149 | }, 1150 | "route53-hostedzone": { 1151 | "prefix": "route53-hostedzone", 1152 | "body": [ 1153 | "${1:route53HostedZone}:", 1154 | " Type: AWS::Route53::HostedZone", 1155 | " Properties:", 1156 | " Name: ${2}", 1157 | " HostedZoneConfig:", 1158 | " Comment: ${3:My hosted zone for example.com}", 1159 | " VPCs:", 1160 | " - ", 1161 | " VPCId: ${4:\"vpc-id\"}", 1162 | " VPCRegion: ${5:\"vpc-region\"}", 1163 | " HostedZoneTags:", 1164 | " - ", 1165 | " Key: ${6:\"SampleKey1\"}", 1166 | " Value: ${7:\"SampleValue1\"}" 1167 | ], 1168 | "description": "", 1169 | "scope": "source.cloudformation" 1170 | }, 1171 | "route53-recordsetgroup": { 1172 | "prefix": "route53-recordsetgroup", 1173 | "body": [ 1174 | "${1:route53RSGroup}:", 1175 | " Type: AWS::Route53::RecordSetGroup", 1176 | " Properties:", 1177 | " Comment: ${2}", 1178 | " HostedZoneId: ${3}", 1179 | " HostedZoneName: ${4}", 1180 | " RecordSets: ", 1181 | " - ${5:recordset}" 1182 | ], 1183 | "description": "", 1184 | "scope": "source.cloudformation" 1185 | }, 1186 | "route53-recordset": { 1187 | "prefix": "route53-recordset", 1188 | "body": [ 1189 | "${1:route53RS}:", 1190 | " Type: AWS::Route53::RecordSet", 1191 | " Properties:", 1192 | " Name: ${2}", 1193 | " Comment: ${3}", 1194 | " Type: ${4:A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT}", 1195 | " TTL: ${5}", 1196 | " AliasTarget: ${6}", 1197 | " Failover: ${7}", 1198 | " GeoLocation: ${8}", 1199 | " HealthCheckId: ${9}", 1200 | " HostedZoneId: ${10}", 1201 | " HostedZoneName: ${11}", 1202 | " Region: ${12}", 1203 | " ResourceRecords: ${13}", 1204 | " - ${14:record}", 1205 | " SetIdentifier: ${15}", 1206 | " Weight: ${16}" 1207 | ], 1208 | "description": "", 1209 | "scope": "source.cloudformation" 1210 | }, 1211 | "s3-bucket": { 1212 | "prefix": "s3-bucket", 1213 | "body": [ 1214 | "${1:s3Bucket}:", 1215 | " Type: AWS::S3::Bucket", 1216 | " Properties: ", 1217 | " AccessControl: ${2:Private | PublicRead | PublicReadWrite | AuthenticatedRead | LogDeliveryWrite | BucketOwnerRead | BucketOwnerFullControl}", 1218 | " BucketName: ${3}", 1219 | " CorsConfiguration: ${4}", 1220 | " LifecycleConfiguration: ${5}", 1221 | " NotificationConfiguration: ${6}", 1222 | " VersioningConfiguration: ${7}", 1223 | " WebsiteConfiguration: ${8}", 1224 | " Tags:", 1225 | " - Key: ${9:key}", 1226 | " Value: ${10:value}" 1227 | ], 1228 | "description": "", 1229 | "scope": "source.cloudformation" 1230 | }, 1231 | "s3-bucketpolicy": { 1232 | "prefix": "s3-bucketpolicy", 1233 | "body": [ 1234 | "${1:s3BucketPolicy}:", 1235 | " Type: AWS::S3::BucketPolicy", 1236 | " Properties:", 1237 | " Bucket: ${2}", 1238 | " PolicyDocument: ${3}" 1239 | ], 1240 | "description": "", 1241 | "scope": "source.cloudformation" 1242 | }, 1243 | "security-group": { 1244 | "prefix": "security-group", 1245 | "body": [ 1246 | "${1:secGroupName}:", 1247 | " Type: AWS::EC2::SecurityGroup", 1248 | " Properties:", 1249 | " GroupName: ${2}", 1250 | " GroupDescription: ${3}", 1251 | " VpcId:${4}", 1252 | " SecurityGroupIngress:", 1253 | " - ${5:Security Group Rule}", 1254 | " SecurityGroupEgress:", 1255 | " - ${6:Security Group Rule}", 1256 | " Tags:", 1257 | " - Key:${7}", 1258 | " Value:${8}" 1259 | ], 1260 | "description": "", 1261 | "scope": "source.cloudformation" 1262 | }, 1263 | "security-group-egress-cidr": { 1264 | "prefix": "security-group-egress-cidr", 1265 | "body": [ 1266 | "IpProtocol: ${1:[tcp|udp|ip]}", 1267 | "FromPort: ${2}", 1268 | "ToPort: ${3}", 1269 | "CidrIp: ${4:--.--.--.--/--}" 1270 | ], 1271 | "description": "", 1272 | "scope": "source.cloudformation" 1273 | }, 1274 | "security-group-ingress-cidr": { 1275 | "prefix": "security-group-ingress-cidr", 1276 | "body": [ 1277 | "IpProtocol: ${1:[tcp|udp|ip]}", 1278 | "FromPort: ${2}", 1279 | "ToPort: ${3}", 1280 | "CidrIp: ${4:--.--.--.--/--}" 1281 | ], 1282 | "description": "", 1283 | "scope": "source.cloudformation" 1284 | }, 1285 | "subnet": { 1286 | "prefix": "subnet", 1287 | "body": [ 1288 | "${1:subnetName}:", 1289 | " Type: AWS::EC2::Subnet", 1290 | " Properties:", 1291 | " AvailabilityZone: ${2:zone-id}", 1292 | " VpcId: ${3:vpc-id}", 1293 | " CidrBlock: ${4:--.--.--.--/--}", 1294 | " Tags:", 1295 | " - Key: ${5:keyname}", 1296 | " Value: ${6:value}" 1297 | ], 1298 | "description": "", 1299 | "scope": "source.cloudformation" 1300 | }, 1301 | "sns-subscription": { 1302 | "prefix": "sns-subscription", 1303 | "body": [ 1304 | "${1:sns-subscription}:", 1305 | " Type: AWS::SNS::Subscription", 1306 | " Properties:", 1307 | " TopicArn: 'arn:aws:sns:[Region]:[AccountID]:[TopicName]'", 1308 | " Protocol: http | https | email | email-json | sms | sqs | application | lambda", 1309 | " Endpoint: ", 1310 | " Region: ", 1311 | " DeliveryPolicy: ", 1312 | " FilterPolicy: ", 1313 | " RawMessageDelivery: " 1314 | ], 1315 | "description": "", 1316 | "scope": "source.cloudformation" 1317 | }, 1318 | "sns-topic": { 1319 | "prefix": "sns-topic", 1320 | "body": [ 1321 | "${1:snsTopic}:", 1322 | " Type: AWS::SNS::Topic", 1323 | " Properties:", 1324 | " DisplayName: ${2}", 1325 | " Subscription: ${3}", 1326 | " TopicName: ${4}" 1327 | ], 1328 | "description": "", 1329 | "scope": "source.cloudformation" 1330 | }, 1331 | "sns-topicpolicy": { 1332 | "prefix": "sns-topicpolicy", 1333 | "body": [ 1334 | "${1:snsTopicPolicy}:", 1335 | "Type: AWS::SNS::TopicPolicy", 1336 | "Properties:", 1337 | " Topics:", 1338 | " - ", 1339 | " ${2:sns-topic-arn}", 1340 | " PolicyDocument: ${3:# A policy document. JSON or YAML}" 1341 | ], 1342 | "description": "", 1343 | "scope": "source.cloudformation" 1344 | }, 1345 | "sqs-queuepolicy": { 1346 | "prefix": "sqs-queuepolicy", 1347 | "body": [ 1348 | "${1:sqsQueuePolicy}:", 1349 | " Type: AWS::SQS::QueuePolicy", 1350 | " Properties:", 1351 | " Queues:", 1352 | " - ", 1353 | " ${2:sqs-id}", 1354 | " PolicyDocument: ${3:# include in JSON format}" 1355 | ], 1356 | "description": "", 1357 | "scope": "source.cloudformation" 1358 | }, 1359 | "sqs-queue": { 1360 | "prefix": "sqs-queue", 1361 | "body": [ 1362 | "${1:sqsQueue}:", 1363 | " Type: AWS::SQS::Queue", 1364 | " Properties:", 1365 | " QueueName: ${2}", 1366 | " DelaySeconds: ${3}", 1367 | " MaximumMessageSize: ${4}", 1368 | " MessageRetentionPeriod: ${5}", 1369 | " ReceiveMessageWaitTimeSeconds: ${6}", 1370 | " RedrivePolicy: ${6}", 1371 | " VisibilityTimeout: ${7}", 1372 | " FifoQueue: ${8: true | false}", 1373 | " Tags:", 1374 | " - Key: ${9:keyname}", 1375 | " Value: ${10:value}" 1376 | ], 1377 | "description": "", 1378 | "scope": "source.cloudformation" 1379 | }, 1380 | "vpc": { 1381 | "prefix": "vpc", 1382 | "body": [ 1383 | "${1:myVPC}:", 1384 | " Type: AWS::EC2::VPC", 1385 | " Properties:", 1386 | " CidrBlock: ${2:--.--.--.--/--}", 1387 | " EnableDnsSupport: ${3:true}", 1388 | " Tags:", 1389 | " - Key: ${4:keyname}", 1390 | " Value: ${5:value}" 1391 | ] 1392 | }, 1393 | "vpn-gateway": { 1394 | "prefix": "vpn-gateway", 1395 | "body": [ 1396 | "${1:vgwName}:", 1397 | " Type: AWS::EC2::VPNGateway", 1398 | " Properties:", 1399 | " Type: ipsec.1", 1400 | " Tags:", 1401 | " - Key: ${2:keyname}", 1402 | " Value: ${3:value}", 1403 | "${4:AttachVpnGateway}:", 1404 | " Type: AWS::EC2::VPCGatewayAttachment", 1405 | " Properties:", 1406 | " VpcId: ${4:vpc-id}", 1407 | " VpnGatewayId: !Ref ${1:vgwName}" 1408 | ], 1409 | "description": "", 1410 | "scope": "source.cloudformation" 1411 | }, 1412 | "code-pipeline": { 1413 | "prefix": "code-pipeline", 1414 | "body": [ 1415 | "${1:codepipeline}:", 1416 | " Type: AWS::CodePipeline::Pipeline", 1417 | " Properties:", 1418 | " Name: ${2:name}", 1419 | " RoleArn: ${3}", 1420 | " ArtifactStore:", 1421 | " Type: S3", 1422 | " Location: ${4}", 1423 | " Stages: ${5}", 1424 | " - ", 1425 | " Name: ${6:name}", 1426 | " Actions:", 1427 | " - ${7:actions}", 1428 | " Blockers:", 1429 | " - ${8:blockers}", 1430 | " RestartExecutionOnUpdate: ${9:true | false}", 1431 | " DisableInboundStageTransitions: ${10}" 1432 | ], 1433 | "description": "", 1434 | "scope": "json" 1435 | }, 1436 | "code-pipeline-stage": { 1437 | "prefix": "code-pipeline-stage", 1438 | "body": [ 1439 | "Name: ${1:name}", 1440 | "Actions:", 1441 | " - ${2:actions}", 1442 | "Blockers:", 1443 | " - ${3:blockers}" 1444 | ], 1445 | "description": "", 1446 | "scope": "json" 1447 | }, 1448 | "code-pipeline-action": { 1449 | "prefix": "code-pipeline-action", 1450 | "body": [ 1451 | "Name: ${1:\"actionName\"}", 1452 | "ActionTypeId:", 1453 | " Category: ${2:Source | Build | Deploy | Test | Invoke | Approval}", 1454 | " Owner: ${3:AWS | ThirdParty | Custom}", 1455 | " Provider: ${4:S3|CodeCommit|GitHub|CloudFormation|CodeBuild|CodeDeploy|ElasticBeanstalk|Lambda|ECS|jenkinsProviderName}", 1456 | " Version: \"1\"", 1457 | "Configuration:", 1458 | " ${5:key: value}", 1459 | "InputArtifacts:", 1460 | " - ", 1461 | " ${6:inputartifact}", 1462 | "OutputArtifacts:", 1463 | " - ", 1464 | " ${7:outputartifact}", 1465 | "RoleArn: ${8:\"\"}", 1466 | "RunOrder: ${9:1|2|3|4}" 1467 | ], 1468 | "description": "", 1469 | "scope": "json" 1470 | } 1471 | } 1472 | -------------------------------------------------------------------------------- /vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | * This folder contains all of the files necessary for your extension 5 | * `package.json` - this is the manifest file that defines the location of the snippet file 6 | and specifies the language of the snippets 7 | * `snippets/snippets.json` - the file containing all snippets 8 | 9 | ## Get up and running straight away 10 | * press `F5` to open a new window with your extension loaded 11 | * create a new file with a file name suffix matching your language 12 | * verify that your snippets are proposed on intellisense 13 | 14 | ## Make changes 15 | * you can relaunch the extension from the debug toolbar after making changes to the files listed above 16 | * you can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes 17 | 18 | ## Install your extension 19 | * To start using your extension with Visual Studio Code copy it into the /.vscode/extensions folder and restart Code. 20 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. -------------------------------------------------------------------------------- /yaml.customTags.json: -------------------------------------------------------------------------------- 1 | // include snippet below in your User Settings (Ctrl + ,) 2 | 3 | { 4 | "yaml.customTags": [ 5 | "!And", 6 | "!If", 7 | "!Not", 8 | "!Equals", 9 | "!Or", 10 | "!FindInMap", 11 | "!Base64", 12 | "!Cidr", 13 | "!Ref", 14 | "!Sub", 15 | "!GetAtt", 16 | "!GetAZs", 17 | "!ImportValue", 18 | "!Select", 19 | "!Split", 20 | "!Join" 21 | ] 22 | } --------------------------------------------------------------------------------