Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Visual Studio Code Snippets for AWS CloudFormation Template
{
"autoscaling-group-vpc": {
"prefix": "autoscaling-group-vpc",
"body": "\"${1:-}\" : {\n \"Type\" : \"AWS::AutoScaling::AutoScalingGroup\",\n \"Properties\" : {\n \"AvailabilityZones\" : [\n ${2:azs}\n ],\n \"LaunchConfigurationName\" : ${3:\"-\"},\n \"MaxSize\" : \"${4:-}\",\n \"MinSize\" : \"${5:-}\",\n \"VPCZoneIdentifier\" : [ ${6:list of subnet ids} ],\n \"Tags\" : [ {\"Key\" : \"Name\",\n \"Value\" : \"${7:-}\",\n \"PropagateAtLaunch\" : \"True\"} \n ]\n }\n}"
},
"autoscaling-group": {
"prefix": "autoscaling-group",
"body": "\"${1:-}\" : {\n \"Type\" : \"AWS::AutoScaling::AutoScalingGroup\",\n \"Properties\" : {\n \"AvailabilityZones\" : [${2:\"--\"}],\n \"LaunchConfigurationName\" : ${3:\"--\"},\n \"MaxSize\" : \"${4:--}\",\n \"MinSize\" : \"${5:--}\",\n \"Tags\" : [ {\"Key\" : \"Name\",\n \"Value\" : \"${6:\"--\"}\",\n \"PropagateAtLaunch\" : \"True\"} \n ]\n }\n}"
},
"availability-zone": {
"prefix": "availability-zone",
"body": "{\"Fn::Join\" : [\"\",[{\"Ref\" : \"AWS::Region\"},\"${1:a}\" ] ]}"
},
"cloudfront-distribution": {
"prefix": "cloudfront-distribution",
"body": "\"${1:cloudfrontDistribution}\": {\n \"Type\": \"AWS::CloudFront::Distribution\",\n \"Properties\": {\n \"DistributionConfig\": ${2}\n }\n}"
},
"cloudtrail": {
"prefix": "cloudtrail",
"body": "\"${1:cloudTrail}\": {\n \"Type\": \"AWS::CloudTrail::Trail\",\n \"Properties\": {\n \"S3BucketName\": \"${2}\",\n \"IncludeGlobalServiceEvents\": \"${3:true | false}\",\n \"IsLogging\": \"${4:true | false}\",\n \"S3KeyPrefix\": \"${5}\",\n \"SnsTopicName\": \"${6}\"\n }\n}"
},
"cloudwatch-alarm": {
"prefix": "cloudwatch-alarm",
"body": "\"${1:cloudWatchAlarm}\": {\n \"Type\": \"AWS::CloudWatch::Alarm\",\n \"Properties\": {\n \"MetricName\": \"${2}\",\n \"Namespace\": \"${3}\",\n \"ComparisonOperator\": \"${4}\",\n \"EvaluationPeriods\": \"${5}\",\n \"Period\": \"${6}\",\n \"Statistic\": \"${7}\",\n \"Threshold\": \"${8}\",\n \"ActionsEnabled\": \"${9:true | false}\",\n \"AlarmActions\": [ \"${10}\" ],\n \"AlarmDescription\": \"${11}\",\n \"AlarmName\": \"${12}\",\n \"Dimensions\": [ \"${13}\" ],\n \"InsufficientDataActions\": [ \"${14}\" ],\n \"OKActions\": [ \"${15}\" ],\n \"Unit\": \"${16}\"\n }\n}"
},
"dynamodb-table": {
"prefix": "dynamodb-table",
"body": "\"${1:dynamodbTable}\": {\n \"Type\": \"AWS::DynamoDB::Table\",\n \"Properties\": {\n \"AttributeDefinitions\": [ ${2} ],\n \"GlobalSecondaryIndexes\": [ ${3} ],\n \"KeySchema\": [ ${4} ],\n \"LocalSecondaryIndexes\": [ ${5} ],\n \"ProvisionedThroughput\": { ${6} },\n \"TableName\": \"${7}\"\n }\n}"
},
"ec2-instance": {
"prefix": "ec2-instance",
"body": "\"${1:-}\": {\n \"Type\": \"AWS::EC2::Instance\",\n \"Properties\": {\n \"KeyName\": ${2:-},\n \"DisableApiTermination\": \"${3:-}\",\n \"ImageId\": { ${4:-} },\n \"InstanceType\": \"${5:-}\",\n \"Monitoring\": \"${6:true|false}\",\n \"SecurityGroupIds\" : [${7:-}],\n \"Tags\": [\n {\n \"Key\": \"${8:-}\",\n \"Value\": \"${9:-}\"\n }\n ],\n \"UserData\": {\n \"Fn::Base64\": {\n \"Fn::Join\": [\n \"\",\n [\n \"#!/bin/bash -ex\",\n \"${10:-}\"\n ]\n ]\n }\n }\n}\n }"
},
"eip-vpc": {
"prefix": "eip-vpc",
"body": "\"${1:eipName}\": {\n \"Type\": \"AWS::EC2::EIP\",\n \"Properties\": {\n \"Domain\": \"vpc\",\n \"InstanceId\": ${2:\"--\"}\n }\n}"
},
"elastic-load-balancer-vpc-internal": {
"prefix": "elastic-load-balancer-vpc-internal",
"body": "\"${1:-}\": {\n \"Type\": \"AWS::ElasticLoadBalancing::LoadBalancer\",\n \"Properties\": {\n \"Listeners\" : [ ${2:-} ],\n \"Scheme\" : \"internal\",\n \"SecurityGroups\" : [ ${3:-} ],\n \"Subnets\" : [ ${4:-} ],\n \"Tags\": [\n {\n \"Key\": \"${5:-}\",\n \"Value\": \"${6:-}\"\n }\n ]\n }\n}"
},
"elastic-load-balancer-vpc": {
"prefix": "elastic-load-balancer-vpc",
"body": "\"${1:-}\": {\n \"Type\": \"AWS::ElasticLoadBalancing::LoadBalancer\",\n \"Properties\": {\n \"Listeners\" : [ ${2:-} ],\n \"SecurityGroups\" : [ ${3:-} ],\n \"Subnets\" : [ ${4:-} ],\n \"Tags\": [\n {\n \"Key\": \"${5:-}\",\n \"Value\": \"${6:-}\"\n }\n ]\n }\n}"
},
"elastic-load-balancer": {
"prefix": "elastic-load-balancer",
"body": "\"${1:-}\": {\n \"Type\": \"AWS::ElasticLoadBalancing::LoadBalancer\",\n \"Properties\": {\n \"AvailabilityZones\" : [ \"${2:-}\" ],\n \"Listeners\" : [ ${3:-} ],\n \"Tags\": [\n {\n \"Key\": \"${4:-}\",\n \"Value\": \"${5:-}\"\n }\n ]\n }\n}"
},
"elasticache-cachecluster": {
"prefix": "elasticache-cachecluster",
"body": "\"${1:elasticacheCacheCluster}\": {\n \"Type\": \"AWS::ElastiCache::CacheCluster\",\n \"Properties\":\n {\n \"AutoMinorVersionUpgrade\": \"${2:true | false}\",\n \"AZMode\": \"${3}\",\n \"CacheNodeType\": \"${4}\",\n \"CacheParameterGroupName\": \"${5}\",\n \"CacheSecurityGroupNames\": [ \"${6}\" ],\n \"CacheSubnetGroupName\": \"${7}\",\n \"ClusterName\": \"${8}\",\n \"Engine\": \"${9}\",\n \"EngineVersion\": \"${10}\",\n \"NotificationTopicArn\": \"${11}\",\n \"NumCacheNodes\": \"${12}\",\n \"Port\": \"${13}\",\n \"PreferredAvailabilityZone\": \"${14}\",\n \"PreferredAvailabilityZones\": [ \"${15}\" ],\n \"PreferredMaintenanceWindow\": \"${16}\",\n \"SnapshotArns\": [\"${17}\" ],\n \"SnapshotRetentionLimit\": \"${18}\",\n \"SnapshotWindow\": \"${19}\",\n \"VpcSecurityGroupIds\": [ \"${20}\" ]\n }\n}"
},
"elasticache-parametergroup": {
"prefix": "elasticache-parametergroup",
"body": "\"${1:elastiicacheParameterGroup}\": {\n \"Type\": \"AWS::ElastiCache::ParameterGroup\",\n \"Properties\": {\n \"CacheParameterGroupFamily\": \"${2}\",\n \"Description\": \"${3}\",\n \"Properties\": { \"${4}\": \"${5}\" }\n }\n}"
},
"elasticache-securitygroup": {
"prefix": "elasticache-securitygroup",
"body": "\"${1:elasticacheSecurityGroup}\": {\n \"Type\": \"AWS::ElastiCache::SecurityGroup\",\n \"Properties\":\n {\n \"Description\": \"${2}\"\n }\n}"
},
"elasticache-securitygroupingress": {
"prefix": "elasticache-securitygroupingress",
"body": "\"${1:elasticacheSecurityGroupIngress}\": {\n \"Type\": \"AWS::ElastiCache::SecurityGroupIngress\",\n \"Properties\":\n {\n \"CacheSecurityGroupName\": \"${2}\",\n \"EC2SecurityGroupName\": \"${3}\",\n \"EC2SecurityGroupOwnerId\": \"${4}\"\n }\n}"
},
"elasticache-subnetgroup": {
"prefix": "elasticache-subnetgroup",
"body": "\"${1:elasticacheSubnetGroup}\": {\n \"Type\": \"AWS::ElastiCache::SubnetGroup\",\n \"Properties\": {\n \"Description\": \"${2}\",\n \"SubnetIds\": [ \"${3}\" ]\n }\n}"
},
"elasticbeanstalk-application": {
"prefix": "elasticbeanstalk-application",
"body": "\"${1:elasticbeanstalkApplication}\": {\n \"Type\": \"AWS::ElasticBeanstalk::Application\",\n \"Properties\": {\n \"ApplicationName\": \"${2}\",\n \"Description\": \"${3}\"\n }\n}"
},
"elasticbeanstalk-applicationversion": {
"prefix": "elasticbeanstalk-applicationversion",
"body": "\"${1:elasticbeanstalkApplicationVersion}\": {\n \"Type\": \"AWS::ElasticBeanstalk::ApplicationVersion\",\n \"Properties\": {\n \"ApplicationName\": \"${2}\",\n \"Description\": \"${3}\",\n \"SourceBundle\": { ${4} }\n }\n}"
},
"elasticbeanstalk-configurationtemplate": {
"prefix": "elasticbeanstalk-configurationtemplate",
"body": "\"${1:elasticbeanstalkConfigurationTemplate}\": {\n \"Type\": \"AWS::ElasticBeanstalk::ConfigurationTemplate\",\n \"Properties\": { \n \"ApplicationName\": \"${2}\",\n \"Description\": \"${3}\",\n \"EnvironmentId\": \"${4}\",\n \"OptionSettings\": [ ${5} ],\n \"SolutionStackName\": \"${6}\",\n \"SourceConfiguration\": ${7}\n } \n}"
},
"elasticbeanstalk-environment": {
"prefix": "elasticbeanstalk-environment",
"body": "\"${1:elasticbeanstalkEnvironment}\": {\n \"Type\": \"AWS::ElasticBeanstalk::Environment\",\n \"Properties\": {\n \"ApplicationName\": \"${2}\",\n \"CNAMEPrefix\": \"${3}\",\n \"Description\": \"${4}\",\n \"EnvironmentName\": \"${5}\",\n \"OptionSettings\": [ ${6} ],\n \"SolutionStackName\": \"${7}\",\n \"TemplateName\": \"${8}\",\n \"Tier\": \"${9}\",\n \"VersionLabel\": \"${10}\"\n }\n}"
},
"elb-listener": {
"prefix": "elb-listener",
"body": "{\n \"InstancePort\" : \"${1:-}\",\n \"InstanceProtocol\" : \"${2:HTTP|HTTPS|TCP|SSL}\",\n \"LoadBalancerPort\" : \"${3:-}\",\n \"Protocol\" : \"${4:HTTP|HTTPS|TCP|SSL}\"\n}"
},
"find-in-map": {
"prefix": "find-in-map",
"body": "\"Fn::FindInMap\": [\n \"${1:map}\",\n \"${2:selector}\",\n \"${3:value}\"\n]"
},
"get-attr": {
"prefix": "get-attr",
"body": "{ \"Fn::GetAtt\" : [ \"${1:logicalNameOfResource}\", \"${2:attributeName}\" ]}"
},
"iam-accesskey": {
"prefix": "iam-accesskey",
"body": "\"${1:iamAccessKey}\": {\n \"Type\": \"AWS::IAM::AccessKey\",\n \"Properties\": {\n \"Status\": \"${2}\",\n \"UserName\": \"${3}\",\n \"Serial\": \"${4}\"\n }\n}"
},
"iam-group": {
"prefix": "iam-group",
"body": "\"${1:iamGroup}\": {\n \"Type\": \"AWS::IAM::Group\",\n \"Properties\": {\n \"Path\": \"${2}\",\n \"Policies\": [ \"${3}\" ]\n }\n}"
},
"iam-instanceprofile": {
"prefix": "iam-instanceprofile",
"body": "\"${1:iamInstanceProfile}\": {\n \"Type\": \"AWS::IAM::InstanceProfile\",\n \"Properties\": {\n \"Path\": \"${2:/}\",\n \"Roles\": [ \"${3}\" ]\n }\n}"
},
"iam-policy": {
"prefix": "iam-policy",
"body": "\"${1:iamPolicy}\": {\n \"Type\": \"AWS::IAM::Policy\",\n \"Properties\": {\n \"Groups\" : [ \"${2}\" ],\n \"PolicyDocument\" : {${3}},\n \"PolicyName\" : \"${4}\",\n \"Roles\" : [ \"${5}\" ],\n \"Users\" : [ \"${6}\" ]\n }\n}"
},
"iam-role": {
"prefix": "iam-role",
"body": "\"${1:iamRole}\": {\n \"Type\": \"AWS::IAM::Role\",\n \"Properties\": {\n \"AssumeRolePolicyDocument\": { ${2} },\n \"Path\": \"${3}\",\n \"Policies\": [ ${4} ]\n }\n}"
},
"iam-user": {
"prefix": "iam-user",
"body": "\"${1:iamUser}\": {\n \"Type\": \"AWS::IAM::User\",\n \"Properties\": {\n \"Path\": \"${2:/}\",\n \"Groups\": [ \"${3}\" ],\n \"LoginProfile\": { \"Password\" : \"${4}\" },\n \"Policies\": [ ${5} ]\n }\n}"
},
"iam-usertogroupaddition": {
"prefix": "iam-usertogroupaddition",
"body": "\"${1:iamUserToGroupAddition}\": {\n \"Type\": \"AWS::IAM::UserToGroupAddition\",\n \"Properties\": {\n \"GroupName\": \"${2}\",\n \"Users\": [ \"${3}\" ]\n }\n}"
},
"internet-gateway": {
"prefix": "internet-gateway",
"body": "\"${1:igwName}\": {\n \"Type\": \"AWS::EC2::InternetGateway\",\n \"Properties\": {\n \"Tags\": [${2:\"-\"}]\n }\n},\n\"AttachGateway\": {\n \"Type\": \"AWS::EC2::VPCGatewayAttachment\",\n \"Properties\": {\n \"VpcId\": ${3:\"--\"},\n \"InternetGatewayId\": { \"Ref\": \"${4:igwName}\" }\n }\n}"
},
"join": {
"prefix": "join",
"body": "{\"Fn::Join\" : [\"\",[ ${1:\"prefix\"}, ${2:\"suffix\"} ] ]}"
},
"kinesis-stream": {
"prefix": "kinesis-stream",
"body": "\"${1:kinesisStream}\": {\n \"Type\": \"AWS::Kinesis::Stream\",\n \"Properties\": {\n \"ShardCount\": \"${2}\"\n }\n}"
},
"launch-config": {
"prefix": "launch-config",
"body": "\"${1:launchConfigName}\": {\n \"Type\" : \"AWS::AutoScaling::LaunchConfiguration\",\n \"Properties\" : {\n \"IamInstanceProfile\" : ${2:\"--\"},\n \"ImageId\" : ${3:\"--\"},\n \"InstanceMonitoring\" : ${4:\"--\"},\n \"InstanceType\" : \"${5:--}\",\n \"KeyName\" : ${6:\"--\"},\n \"SecurityGroups\" : [ ${7:\"--\"} ],\n \"UserData\" : {\n \"Fn::Base64\": \n { \"Fn::Join\": [\n \"\",\n [\n \"#!/bin/bash -ex\",\n \"${8:-}\"\n ]\n \n ] \n }\n }\n }\n}"
},
"logs-loggroup": {
"prefix": "logs-loggroup",
"body": "\"${1:logLogGroup}\": {\n \"Type\": \"AWS::Logs::LogGroup\",\n \"Properties\": {\n \"RetentionInDays\": \"${2}\"\n }\n}"
},
"logs-metricfilter": {
"prefix": "logs-metricfilter",
"body": "\"${1:logsMetricFilter}\": {\n \"Type\": \"AWS::Logs::MetricFilter\", \n \"Properties\": {\n \"FilterPattern\": [ \"${2}\" ],\n \"LogGroupName\": \"${3}\",\n \"MetricTransformations\": [ ${4} ]\n }\n}"
},
"map-item": {
"prefix": "map-item",
"body": "\"${1:selector}\": {\n\"${2:key}\": \"${3:val}\"\n}"
},
"map": {
"prefix": "map",
"body": "\"${1:mapName}\": {\n \"${2:selector}\": {\n \"${3:key}\": \"${4:val}\"\n },\n \"${5:selector}\": {\n \"${6:key}\": \"${7:val}\"\n }\n}"
},
"opsworks-app": {
"prefix": "opsworks-app",
"body": "\"${1:opsworksApp}\": {\n \"Type\": \"AWS::OpsWorks::App\",\n \"Properties\": {\n \t\"Name\": \"${2}\",\n \"StackId\": \"${3}\",\n \"Type\": \"${4}\",\n \"AppSource\": { ${5} },\n \"Attributes\": { ${6}:${7} },\n \"Description\": \"${8}\",\n \"Domains\": [ \"${9}\" ],\n \"EnableSsl\": \"${10:true | false}\",\n \"Shortname\": \"${11}\",\n \"SslConfiguration\": { ${12} }\n }\n}"
},
"opsworks-elasticloadbalancerattachment": {
"prefix": "opsworks-elasticloadbalancerattachment",
"body": "\"${1:opsworksElasticLoadBalancerAttachment}\": {\n \"Type\": \"AWS::OpsWorks::ElasticLoadBalancerAttachment\",\n \"Properties\": {\n \"ElasticLoadBalancerName\": \"${2}\",\n \"LayerId\": \"${3}\"\n }\n}"
},
"opsworks-instance": {
"prefix": "opsworks-instance",
"body": "\"${1:opsworksInstance}\": {\n \"Type\": \"AWS::OpsWorks::Instance\",\n \"Properties\": {\n \"InstanceType\": \"${2}\",\n \"LayerIds\": [ \"${3}\" ],\n \"StackId\": \"${4}\",\n \"AmiId\": \"${5}\",\n \"Architecture\": \"${6}\",\n \"AutoScalingType\": \"${7}\",\n \"AvailabilityZone\": \"${8}\",\n \"InstallUpdatesOnBoot\": \"${9:true | false}\",\n \"Os\": \"${10}\",\n \"RootDeviceType\": \"${11}\",\n \"SshKeyName\": \"${12}\",\n \"SubnetId\": \"${13}\",\n \"TimeBasedAutoScaling\": { ${14} }\n }\n}"
},
"opsworks-layer": {
"prefix": "opsworks-layer",
"body": "\"${1:opsworksLayer}\": {\n \"Type\": \"AWS::OpsWorks::Layer\",\n \"Properties\": {\n \t\"AutoAssignElasticIps\": \"${2:true | false}\",\n \"AutoAssignPublicIps\": \"${3:true | false}\",\n \"EnableAutoHealing\": \"${4:true | false}\",\n \"Name\": \"${5}\",\n \"Shortname\": \"${6}\",\n \"StackId\": \"${7}\",\n \"Type\": \"${8}\",\n \"Attributes\": { \"${9}\":\"${10}\" },\n \"CustomInstanceProfileArn\": \"${11}\",\n \"CustomRecipes\": ${12},\n \"CustomSecurityGroupIds\": [ \"${13}\" ],\n \"InstallUpdatesOnBoot\": \"${14:true | false}\",\n \"LoadBasedAutoScaling\": { ${15} },\n \"Packages\": [ \"${16}\" ],\n \"VolumeConfigurations\": [ ${17} ]\n }\n}"
},
"opsworks-stack": {
"prefix": "opsworks-stack",
"body": "\"${1:opsworksStack}\": {\n \"Type\": \"AWS::OpsWorks::Stack\",\n \"Properties\": {\n \"DefaultInstanceProfileArn\": \"${2}\",\n \"Name\": \"${3}\",\n \"ServiceRoleArn\": \"${4}\",\n \"Attributes\": { \"${5}\":\"${6}\" },\n \"ChefConfiguration\": { ${7} },\n \"ConfigurationManager\": { ${8} },\n \"CustomCookbooksSource\": { ${9} },\n \"CustomJson\": { ${10} },\n \"DefaultAvailabilityZone\": \"${11}\",\n \"DefaultOs\": \"${12}\",\n \"DefaultRootDeviceType\": \"${13}\",\n \"DefaultSshKeyName\": \"${14}\",\n \"DefaultSubnetId\": \"${15}\",\n \"HostnameTheme\": \"${16}\",\n \"UseCustomCookbooks\": \"${17:true | false}\",\n \"UseOpsworksSecurityGroups\": \"${18:true | false}\",\n \"VpcId\": \"${19}\"\n }\n}"
},
"output": {
"prefix": "output",
"body": "\"${1:name}\" : {\n \"Value\" : ${2:-}\n}"
},
"parameter-type-availabilityzone-name-list": {
"prefix": "parameter-type-availabilityzone-name-list",
"body": "List<AWS::EC2::AvailabilityZone::Name>"
},
"parameter-type-availabilityzone-name": {
"prefix": "parameter-type-availabilityzone-name",
"body": "AWS::EC2::AvailabilityZone::Name"
},
"parameter-type-ec2-image-id-list": {
"prefix": "parameter-type-ec2-image-id-list",
"body": "List<AWS::EC2::Image::Id>"
},
"parameter-type-ec2-image-id": {
"prefix": "parameter-type-ec2-image-id",
"body": "AWS::EC2::Image::Id"
},
"parameter-type-ec2-instance-id-list": {
"prefix": "parameter-type-ec2-instance-id-list",
"body": "List<AWS::EC2::Instance::Id>"
},
"parameter-type-ec2-instance-id": {
"prefix": "parameter-type-ec2-instance-id",
"body": "AWS::EC2::Instance::Id"
},
"parameter-type-ec2-security-group-name-list": {
"prefix": "parameter-type-ec2-security-group-name-list",
"body": "List<AWS::EC2::SecurityGroup::GroupName>"
},
"parameter-type-ec2-security-group-name": {
"prefix": "parameter-type-ec2-security-group-name",
"body": "AWS::EC2::SecurityGroup::GroupName"
},
"parameter-type-ec2-volume-id-list": {
"prefix": "parameter-type-ec2-volume-id-list",
"body": "List<AWS::EC2::Volume::Id>"
},
"parameter-type-ec2-volume-id": {
"prefix": "parameter-type-ec2-volume-id",
"body": "AWS::EC2::Volume::Id"
},
"parameter-type-keypair-keyname": {
"prefix": "parameter-type-keypair-keyname",
"body": "AWS::EC2::KeyPair::KeyName"
},
"parameter-type-route53-hostedzone-id-list": {
"prefix": "parameter-type-route53-hostedzone-id-list",
"body": "List<AWS::Route53::HostedZone::Id>"
},
"parameter-type-route53-hostedzone-id": {
"prefix": "parameter-type-route53-hostedzone-id",
"body": "AWS::Route53::HostedZone::Id"
},
"parameter-type-securitygroup-id-list": {
"prefix": "parameter-type-securitygroup-id-list",
"body": "List<AWS::EC2::SecurityGroup::Id>"
},
"parameter-type-securitygroup-id": {
"prefix": "parameter-type-securitygroup-id",
"body": "AWS::EC2::SecurityGroup::Id"
},
"parameter-type-subnet-id-list": {
"prefix": "parameter-type-subnet-id-list",
"body": "List<AWS::EC2::Subnet::Id>"
},
"parameter-type-subnet-id": {
"prefix": "parameter-type-subnet-id",
"body": "AWS::EC2::Subnet::Id"
},
"parameter-type-vpc-id-list": {
"prefix": "parameter-type-vpc-id-list",
"body": "List<AWS::EC2::VPC::Id>"
},
"parameter-type-vpc-id": {
"prefix": "parameter-type-vpc-id",
"body": "AWS::EC2::VPC::Id"
},
"parameter": {
"prefix": "parameter",
"body": "\"${1:paramName}\": {\n \"Description\": \"${2:-}\",\n \"Type\": \"${3:[String|Number|CommaDelimitedList]}\",\n \"Default\": \"${4:-}\"\n}"
},
"rds-dbinstance": {
"prefix": "rds-dbinstance",
"body": "\"${1:rdsDBInstance}\": {\n \"Type\": \"AWS::RDS::DBInstance\",\n \"Properties\": {\n \"AllocatedStorage\": \"${2}\",\n \"DBInstanceClass\": \"${3}\",\n \"AllowMajorVersionUpgrade\": \"${4:true | false}\",\n \"AutoMinorVersionUpgrade\": \"${5:true | false}\",\n \"AvailabilityZone\": \"${6}\",\n \"BackupRetentionPeriod\": \"${7}\",\n \"CharacterSetName\": \"${8}\",\n \"DBInstanceIdentifier\": \"${9}\",\n \"DBName\": \"${10}\",\n \"DBParameterGroupName\": \"${11}\",\n \"DBSecurityGroups\": [ \"${12}\" ],\n \"DBSnapshotIdentifier\": \"${13}\",\n \"DBSubnetGroupName\": \"${14}\",\n \"Engine\": \"${15}\",\n \"EngineVersion\": \"${16}\",\n \"Iops\": \"${17}\",\n \"KmsKeyId\": \"${18}\",\n \"LicenseModel\": \"${19}\",\n \"MasterUsername\": \"${20}\",\n \"MasterUserPassword\": \"${21}\",\n \"MultiAZ\": \"${22:true | false}\",\n \"OptionGroupName\": \"${23}\",\n \"Port\": \"${24}\",\n \"PreferredBackupWindow\": \"${25}\",\n \"PreferredMaintenanceWindow\": \"${26}\",\n \"PubliclyAccessible\": \"${27:true | false}\",\n \"SourceDBInstanceIdentifier\": \"${28}\",\n \"StorageEncrypted\": \"${29:true | false}\",\n \"StorageType\": \"${30}\",\n \"Tags\": [ ${31} ],\n \"VPCSecurityGroups\": [ \"${32}\" ]\n }\n}"
},
"rds-dbparametergroup": {
"prefix": "rds-dbparametergroup",
"body": "\"${1:rdsDBParameterGroup}\": {\n \"Type\": \"AWS::RDS::DBParameterGroup\",\n \"Properties\": {\n \"Description\": \"${2}\",\n \"Family\": \"${3}\",\n \"Parameters\": {${4}},\n \"Tags\": [ ${5} ]\n }\n}"
},
"rds-dbsecuritygroup": {
"prefix": "rds-dbsecuritygroup",
"body": "\"${1:rdsDBSecurityGroup}\": {\n \"Type\": \"AWS::RDS::DBSecurityGroup\",\n \"Properties\": {\n \"EC2VpcId\": { ${2} },\n \"DBSecurityGroupIngress\": [ ${3} ],\n \"GroupDescription\": \"${4}\",\n \"Tags\": [ ${5} ]\n }\n}"
},
"rds-dbsecuritygroupingress": {
"prefix": "rds-dbsecuritygroupingress",
"body": "{\n \"CIDRIP\": \"${1}\",\n \"DBSecurityGroupName\": \"${2}\",\n \"EC2SecurityGroupId\": \"${3}\",\n \"EC2SecurityGroupName\": \"${4}\",\n \"EC2SecurityGroupOwnerId\": \"${5}\"\n}"
},
"rds-dbsubnetgroup": {
"prefix": "rds-dbsubnetgroup",
"body": "\"${1:rdsDBSubnetGroup}\": {\n \"Type\": \"AWS::RDS::DBSubnetGroup\",\n \"Properties\": {\n \"DBSubnetGroupDescription\": \"${2}\",\n \"SubnetIds\": [ \"${3}\" ],\n \"Tags\": [ ${4} ]\n }\n}"
},
"rds-eventsubscription": {
"prefix": "rds-eventsubscription",
"body": "\"${1:rdsEventSubscription}\": {\n \"Type\": \"AWS::RDS::EventSubscription\",\n \"Properties\": {\n \"Enabled\": \"${2:true | false}\",\n \"EventCategories\": [ \"${3}\" ],\n \"SnsTopicArn\": \"${4}\",\n \"SourceIds\": [ \"${5}\" ],\n \"SourceType \": \"${6}\"\n }\n}"
},
"redshift-cluster": {
"prefix": "redshift-cluster",
"body": "\"${1:redshiftCluster}\": {\n \"Type\": \"AWS::Redshift::Cluster\",\n \"Properties\": {\n \"AllowVersionUpgrade\": \"${2:true | false}\",\n \"AutomatedSnapshotRetentionPeriod\": \"${3}\",\n \"AvailabilityZone\": \"${4}\",\n \"ClusterParameterGroupName\": \"${5}\",\n \"ClusterSecurityGroups\": [ \"${6}\" ],\n \"ClusterSubnetGroupName\": \"${7}\",\n \"ClusterType\": \"${8}\",\n \"ClusterVersion\": \"${9}\",\n \"DBName\": \"${10}\",\n \"ElasticIp\": \"${11}\",\n \"Encrypted\": \"${12:true | false}\",\n \"HsmClientCertificateIdentifier\": \"${13}\",\n \"HsmConfigurationIdentifier\": \"${14}\",\n \"MasterUsername\": \"${15}\",\n \"MasterUserPassword\": \"${16}\",\n \"NodeType\": \"${17}\",\n \"NumberOfNodes\": \"${18}\",\n \"OwnerAccount\": \"${19}\",\n \"Port\": \"${20}\",\n \"PreferredMaintenanceWindow\": \"${21}\",\n \"PubliclyAccessible\": \"${22:true | false}\",\n \"SnapshotClusterIdentifier\": \"${23}\",\n \"SnapshotIdentifier\": \"${24}\",\n \"VpcSecurityGroupIds\": [ \"${25}\" ]\n }\n}"
},
"redshift-clusterparametergroup": {
"prefix": "redshift-clusterparametergroup",
"body": "\"${1:redshiftClusterParameterGroup}\": {\n \"Type\": \"AWS::Redshift::ClusterParameterGroup\",\n \"Properties\": {\n \"Description\": \"${2}\",\n \"ParameterGroupFamily\": \"${3}\",\n \"Parameters\": [ ${4} ]\n }\n}"
},
"redshift-clustersecuritygroup": {
"prefix": "redshift-clustersecuritygroup",
"body": "\"${1:redshiftClusterSecurityGroup}\": {\n \"Type\": \"AWS::Redshift::ClusterSecurityGroup\",\n \"Properties\": {\n \"Description\": \"${2}\"\n }\n}"
},
"redshift-clustersecuritygroupingress": {
"prefix": "redshift-clustersecuritygroupingress",
"body": "\"${1:redshiftClusterSecurityGroupIngress}\": {\n \"Type\": \"AWS::Redshift::ClusterSecurityGroupIngress\",\n \"Properties\": {\n \"ClusterSecurityGroupName\": \"${2}\",\n \"CIDRIP\": \"${3}\",\n \"EC2SecurityGroupName\": \"${4}\",\n \"EC2SecurityGroupOwnerId\": \"${5}\"\n }\n}"
},
"redshift-clustersubnetgroup": {
"prefix": "redshift-clustersubnetgroup",
"body": "\"${1:redshiftClusterSubnetGroup}\": {\n \"Type\": \"AWS::Redshift::ClusterSubnetGroup\",\n \"Properties\": {\n \"Description\": \"${2}\",\n \"SubnetIds\": [ \"${3}\" ]\n }\n}"
},
"ref": {
"prefix": "ref",
"body": "{ \"Ref\": \"${1:logicalName}\" }"
},
"resource": {
"prefix": "resource",
"body": "\"${1:resourceName}\": {\n \"Description\": \"${2:-}\",\n \"Type\": \"${3:-}\",\n \"Properties\": \"${4:-}\"\n}"
},
"route-table-assoc": {
"prefix": "route-table-assoc",
"body": "\"${1:routeTableAssocName\"}: {\n \"Type\": \"AWS::EC2::SubnetRouteTableAssociation\",\n \"Properties\": {\n \"SubnetId\": ${2:\"--\"},\n \"RouteTableId\": ${3:\"--\"}\n }\n}"
},
"route-table": {
"prefix": "route-table",
"body": "\"${1:routeTableName}\": {\n \"Type\": \"AWS::EC2::RouteTable\",\n \"Properties\": {\n \"VpcId\": ${2:\"--\"},\n \"Tags\": [${3:\"--\"}]\n }\n}"
},
"route": {
"prefix": "route",
"body": "\"${1:routeName}\": {\n \"Type\": \"AWS::EC2::Route\",\n \"Properties\": {\n \"RouteTableId\": ${2:\"--\"},\n \"DestinationCidrBlock\": \"${3:\"--\"},\n \"GatewayId\": ${4:\"--\"}\n }\n}"
},
"route53-healthcheck": {
"prefix": "route53-healthcheck",
"body": "\"${1:route53HealthCheck}\": {\n \"Type\": \"AWS::Route53::HealthCheck\",\n \"Properties\": {\n \"HealthCheckConfig\": { ${2} },\n \"HealthCheckTags\": [ ${3} ]\n }\n}"
},
"route53-hostedzone": {
"prefix": "route53-hostedzone",
"body": "\"${1}\": {\n\t\"Type\": \"AWS::Route53::HostedZone\",\n\t\"Properties\": {\n\t\t\"Name\": \"{$2}\",\n\t\t\"VPCs\": \"{$3}\",\n\t\t\"HostedZoneConfig\": {{$4}},\n\t\t\"HostedZoneTags\": [{$5}]\n\t}\n}"
},
"route53-recordset-group": {
"prefix": "route53-recordsetgroup",
"body": "\"${1:route53RSGroup}\": {\n\t\"Type\": \"AWS::Route53::RecordSetGroup\",\n\t\"Properties\": {\n\t\t\"HostedZoneId\": \"${2}\",\n\t\t\"HostedZoneName\": \"${3}\",\n\t\t\"RecordSets\": [ {${4}} ],\n\t\t\"Comment\": \"${5}\"\n }\n}"
},
"route53-recordset": {
"prefix": "route53-recordset",
"body": "\"${1:route53RS}\": {\n\t\"Type\": \"AWS::Route53::RecordSet\",\n\t\"Properties\": {\n\t\t\"Name\": \"${2}\",\n\t\t\"Type\": \"${3:A | AAAA | CNAME | MX | NS | PTR | SOA | SPF | SRV | TXT}\",\n\t\t\"AliasTarget\": {${4}},\n\t\t\"Comment\": \"${5}\",\n\t\t\"Failover\": \"${6}\",\n\t\t\"GeoLocation\": {${7}},\n\t\t\"HealthCheckId\": \"${8}\",\n\t\t\"HostedZoneId\": \"${9}\",\n\t\t\"HostedZoneName\": \"${10}\",\n\t\t\"Region\": \"${11}\",\n\t\t\"ResourceRecords\": [ \"${12}\" ],\n\t\t\"SetIdentifier\": \"${13}\",\n\t\t\"TTL\": \"${14}\",\n\t\t\"Weight\": \"${15}\"\n\t}\n}"
},
"s3-bucket": {
"prefix": "s3-bucket",
"body": "\"${1:s3Bucket}\": {\n\t\"Type\": \"AWS::S3::Bucket\",\n\t\"Properties\": {\n\t\t\"AccessControl\": \"${2:Private | PublicRead | PublicReadWrite | AuthenticatedRead | LogDeliveryWrite | BucketOwnerRead | BucketOwnerFullControl}\",\n\t\t\"BucketName\": \"${3}\",\n\t\t\"CorsConfiguration\": {${4}},\n\t\t\"LifecycleConfiguration\": {${5}},\n\t\t\"NotificationConfiguration\": {${6}},\n\t\t\"VersioningConfiguration\": {${7}},\n\t\t\"WebsiteConfiguration\": {${8}},\n\t\t\"Tags\": [${9}] \n\t}\n}"
},
"s3-bucketpolicy": {
"prefix": "s3-bucketpolicy",
"body": "\"${1:s3BucketPolicy}\": {\n\t\"Type\": \"AWS::S3::BucketPolicy\",\n\t\"Properties\": {\n\t\t\"Bucket\" : \"${2}\",\n\t\t\"PolicyDocument\" : {${3}}\n\t}\n}"
},
"security-group-egress-block": {
"prefix": "security-group-egress-block",
"body": "\"SecurityGroupEgress\" : [ \n ${1:--insert rules--}\n]"
},
"security-group": {
"prefix": "security-group",
"body": "\"${1:secGroupName}\" : {\n \"Type\" : \"AWS::EC2::SecurityGroup\",\n \"Properties\" : {\n \"GroupDescription\" : \"${2:-}\",\n \"SecurityGroupIngress\" : [ \n ${3:--insert rules--}\n ],\n \"VpcId\" : ${4:ref-to-vpc},\n \"Tags\" : [ ${5:insert tag} ]\n }\n}"
},
"select-list": {
"prefix": "select-list",
"body": "{ \"Fn::Select\" : [ ${1:0|1|etc}, {\"Ref\": \"${2:list_name}\"} ] }"
},
"sg-egress-cidr": {
"prefix": "security-group-egress-cidr",
"body": "{ \"IpProtocol\" : \"${1:[tcp|udp|ip]}\", \"FromPort\" : \"${2:-}\", \"ToPort\" : \"${3:-}\", \"CidrIp\" : \"${4:-}\" }"
},
"sg-ingress-cidr": {
"prefix": "security-group-ingress-cidr",
"body": "{ \"IpProtocol\" : \"${1:[tcp|udp|ip]}\", \"FromPort\" : \"${2:-}\", \"ToPort\" : \"${3:-}\", \"CidrIp\" : \"${4:-}\" }"
},
"sns-topic": {
"prefix": "sns-topic",
"body": "\"${1:snsTopic}\": {\n \"Type\": \"AWS::SNS::Topic\",\n \"Properties\": {\n \"DisplayName\": \"${2}\",\n \"Subscription\": [ ${3} ],\n \"TopicName\": \"${4}\"\n }\n}"
},
"sns-topicpolicy": {
"prefix": "sns-topicpolicy",
"body": "\"${1:snsTopicPolicy}\": {\n \"Type\": \"AWS::SNS::TopicPolicy\",\n \"Properties\":\n {\n \"PolicyDocument\": {${2}},\n \"Topics\": [ {${3}} ]\n }\n}"
},
"sqs-queue": {
"prefix": "sqs-queue",
"body": "\"${1:sqsQueue}\": {\n \"Type\": \"AWS::SQS::Queue\",\n \"Properties\": {\n \"DelaySeconds\": \"${2}\",\n \"MaximumMessageSize\": \"${3}\",\n \"MessageRetentionPeriod\": \"${4}\",\n \"QueueName\": \"${5}\",\n \"ReceiveMessageWaitTimeSeconds\": \"${6}\",\n \"RedrivePolicy\": {${7}},\n \"VisibilityTimeout\": \"${8}\"\n }\n}"
},
"sqs-queuepolicy": {
"prefix": "sqs-queuepolicy",
"body": "\"${1:sqsQueuePolicy}\": {\n \"Type\": \"AWS::SQS::QueuePolicy\",\n \"Properties\": {\n \"PolicyDocument\": {${2}},\n \"Queues\": [ ${3} ]\n }\n}"
},
"start": {
"prefix": "start",
"body": "{\n \"AWSTemplateFormatVersion\": \"2010-09-09\",\n \"Description\": \"${1}\",\n \"Metadata\": {\n\n },\n \"Parameters\": {\n \n },\n \"Mappings\": {\n\n },\n \"Conditions\": {\n\n },\n \"Resources\": {\n\n },\n \"Outputs\": {\n\n }\n}"
},
"subnet": {
"prefix": "subnet",
"body": "\"${1:subnetName}\": {\n \"Type\": \"AWS::EC2::Subnet\",\n \"Properties\": {\n \"AvailabilityZone\": ${2:\"-\"},\n \"VpcId\": ${3:\"-\"},\n \"CidrBlock\": ${4:\"-\"},\n \"Tags\": [${5:\"-\"}]\n }\n}"
},
"tag": {
"prefix": "tag",
"body": "{ \"Key\": \"${1:-}\", \"Value\": ${2:\"--\"} }"
},
"vpc": {
"prefix": "vpc",
"body": "\"${1:name}\": {\n \"Type\": \"AWS::EC2::VPC\",\n \"Properties\": {\n \"CidrBlock\": ${2:\"----/--\"},\n \"Tags\": [${3:-}]\n }\n}"
},
"vpn-gateway": {
"prefix": "vpn-gateway",
"body": "\"${1:vgwName}\": {\n \"Type\": \"AWS::EC2::VPNGateway\",\n \"Properties\": {\n \"Type\": \"ipsec.1\",\n \"Tags\": [${2:\"--\"}]\n }\n},\n\"AttachVpnGateway\": {\n \"Type\": \"AWS::EC2::VPCGatewayAttachment\",\n \"Properties\": {\n \"VpcId\": ${3:\"--\"},\n \"VpnGatewayId\": { \"Ref\": \"${4:vgwName}\" }\n }\n}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment