diff --git a/README.md b/README.md index 8c20f18..90b594c 100644 --- a/README.md +++ b/README.md @@ -54,11 +54,11 @@ After installation, open your User Settings ```(Ctrl + ,)``` and paste preferenc ```json // Custom tags for the parser to use "yaml.customTags": [ - "!And", - "!If", - "!Not", - "!Equals", - "!Or", + "!And sequence", + "!If sequence", + "!Not sequence", + "!Equals sequence", + "!Or sequence", "!FindInMap sequence", "!Base64", "!Cidr", diff --git a/snippets/snippets.json b/snippets/snippets.json index faf3a69..b1db1bf 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -1,4 +1,10 @@ { + "autoscaling-group-scheduledaction": { + "prefix": "autoscaling-group-scheduledaction", + "body": "\r\n\"${1:-}\" : {\r\n \"Type\" : \"AWS::AutoScaling::ScheduledAction\",\r\n \"Properties\" : {\r\n \"AutoScalingGroupName\" : \"${2}\",\r\n \"MaxSize\" : ${3:1},\r\n \"MinSize\" : ${4:0},\r\n \"DesiredCapacity\" : ${5:1},\r\n \"Recurrence\" : \"${6}\"}\r\n}\r\n", + "description": "Specifies a scheduled scaling action for an Amazon EC2 Auto Scaling group, changing the number of servers available for your application in response to predictable load changes.", + "scope": "source.cloudformation" + }, "autoscaling-group-vpc": { "prefix": "autoscaling-group-vpc", "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", @@ -371,6 +377,12 @@ "description": "", "scope": "source.cloudformation" }, + "nat-gateway": { + "prefix": "nat-gateway", + "body": "\r\n\"${1:ngwName}\": {\r\n \"Type\" : \"AWS::EC2::NatGateway\",\r\n \"Properties\" : {\r\n \"AllocationId\" : ${1:eip-id},\r\n \"SubnetId\" : ${2:subnet-id},\r\n \"Tags\" : [${3:\"-\"}]\r\n }\r\n}\r\n", + "description": "", + "scope": "source.cloudformation" + }, "opsworks-app": { "prefix": "opsworks-app", "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", @@ -649,7 +661,7 @@ }, "s3-bucket": { "prefix": "s3-bucket", - "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", + "body": "\r\n\"${1:s3Bucket}\": {\r\n\t\"Type\": \"AWS::S3::Bucket\",\r\n\t\"Properties\": {\r\n\t\t\"AccelerateConfiguration\": {${1}},\r\n\t\t\"AccessControl\": \"${2:Private | PublicRead | PublicReadWrite | AuthenticatedRead | LogDeliveryWrite | BucketOwnerRead | BucketOwnerFullControl}\",\r\n\t\t\"AnalyticsConfigurations\": [${3}],\r\n\t\t\"BucketEncryption\": {${4}},\r\n\t\t\"BucketName\": \"${5}\",\r\n\t\t\"CorsConfiguration\": {${6}},\r\n\t\t\"InventoryConfigurations\": [${7}],\r\n\t\t\"LifecycleConfiguration\": {${8}},\r\n\t\t\"LoggingConfiguration\": {${9}},\r\n\t\t\"MetricsConfigurations\": [${10}],\r\n\t\t\"NotificationConfiguration\": {${11}},\r\n\t\t\"ObjectLockConfiguration\": {${12}},\r\n\t\t\"ObjectLockEnabled\": ${13},\r\n\t\t\"PublicAccessBlockConfiguration\": {${14}},\r\n\t\t\"ReplicationConfiguration\": {${15}},\r\n\t\t\"VersioningConfiguration\": {${16}},\r\n\t\t\"WebsiteConfiguration\": {${17}},\r\n\t\t\"Tags\": [${18}] \r\n\t}\r\n}\r\n", "description": "", "scope": "source.cloudformation" }, diff --git a/snippets/yaml-snippets.json b/snippets/yaml-snippets.json index 3c10a8c..7119441 100644 --- a/snippets/yaml-snippets.json +++ b/snippets/yaml-snippets.json @@ -1,5 +1,19 @@ { - + "autoscaling-group-scheduledaction": { + "prefix": "autoscaling-group-scheduledaction", + "body": [ + "${1:myAutoscalingGroup}: ", + " Type: AWS::AutoScaling::AutoScalingGroup", + " Properties:", + " AutoScalingGroupName: ${2:asg}", + " MaxSize: ${3:1}", + " MinSize: ${4:0}", + " DesiredCapacity: ${5:1}", + " Recurrence: ${6}" + ], + "description": "Specifies a scheduled scaling action for an Amazon EC2 Auto Scaling group, changing the number of servers available for your application in response to predictable load changes.", + "scope": "source.cloudformation" + }, "autoscaling-group-vpc": { "prefix": "autoscaling-group-vpc", "body": [ @@ -257,8 +271,8 @@ "${1:eipName}:", " Type: AWS::EC2::EIP", " Properties:", - " Domain: vpc", - " InstanceId: ${2:instance-id}" + " Domain: vpc", + " InstanceId: ${2:instance-id}" ], "description": "", "scope": "source.cloudformation" @@ -375,14 +389,14 @@ " AssumeRolePolicyDocument: ", " Policies:", " - ", - " PolicyName: \"root\"", - " PolicyDocument:", - " Version: \"2012-10-17\"", - " Statement:", - " - ", - " Effect: \"Allow\"", - " Action: \"*\"", - " Resource: \"*\"" + " PolicyName: \"root\"", + " PolicyDocument:", + " Version: \"2012-10-17\"", + " Statement:", + " - ", + " Effect: \"Allow\"", + " Action: \"*\"", + " Resource: \"*\"" ], "description": "", "scope": "source.cloudformation" @@ -593,6 +607,22 @@ "description": "", "scope": "source.cloudformation" }, + "nat-gateway": { + "prefix": "nat-gateway", + "body": [ + "${1:ngwName}:", + " Type: AWS::EC2::NatGateway", + " Properties:", + " AllocationId: ${2:eip-id}", + " SubnetId: ${3:subnet-id}", + " Tags:", + " - Key: ${4:keyname}", + " Value: ${5:value}" + ], + "description": "", + "scope": "source.cloudformation" + + }, "rds-dbinstance": { "prefix": "rds-dbinstance", "body": [ @@ -1214,16 +1244,29 @@ "${1:s3Bucket}:", " Type: AWS::S3::Bucket", " Properties: ", + " AccelerateConfiguration:", + " AccelerationStatus: ${1}", " AccessControl: ${2:Private | PublicRead | PublicReadWrite | AuthenticatedRead | LogDeliveryWrite | BucketOwnerRead | BucketOwnerFullControl}", - " BucketName: ${3}", - " CorsConfiguration: ${4}", - " LifecycleConfiguration: ${5}", - " NotificationConfiguration: ${6}", - " VersioningConfiguration: ${7}", - " WebsiteConfiguration: ${8}", + " AnalyticsConfigurations: ${3}", + " BucketEncryption: ${4}", + " BucketName: ${5}", + " CorsConfiguration: ${6}", + " InventoryConfigurations:", + " - ${7}", + " LifecycleConfiguration: ${8}", + " LoggingConfiguration: ${9}", + " MetricsConfigurations:", + " - ${10}", + " NotificationConfiguration: ${11}", + " ObjectLockConfiguration: ${12}", + " ObjectLockEnabled: ${13}", + " PublicAccessBlockConfiguration: ${14}", + " ReplicationConfiguration: ${15}", + " VersioningConfiguration: ${16}", + " WebsiteConfiguration: ${17}", " Tags:", - " - Key: ${9:key}", - " Value: ${10:value}" + " - Key: ${18:key}", + " Value: ${19:value}" ], "description": "", "scope": "source.cloudformation"