Skip to content

Commit 4ca6b4a

Browse files
author
AWS Scripting Guy
committed
az, cloudfront, cloudtrail, dynamo snippets
1 parent 2d8101f commit 4ca6b4a

File tree

1 file changed

+78
-3
lines changed

1 file changed

+78
-3
lines changed

snippets/yaml-snippets.json

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,54 @@
4040
"description": "",
4141
"scope": "source.cloudformation"
4242
},
43+
"availability-zone": {
44+
"prefix": "availability-zone",
45+
"body": [
46+
"!Join",
47+
" - ''",
48+
" - - !Ref 'AWS::Region'",
49+
" - ${1:'a'}"
50+
],
51+
"description": "",
52+
"scope": "source.cloudformation"
53+
},
54+
"cloudfront-distribution": {
55+
"prefix": "cloudfront-distribution",
56+
"body": [
57+
"${1:cloudfrontDistribution}:",
58+
" Type: AWS::CloudFront::Distribution",
59+
" Properties:",
60+
" DistributionConfig:",
61+
" CacheBehaviors:",
62+
" - ",
63+
" ${2:behavior}",
64+
" DefaultCacheBehavior: ${3}",
65+
" IPV6Enabled: ${4:true | false}",
66+
" Origins:",
67+
" - ",
68+
" ${5:origin}",
69+
" Tags:",
70+
" - Key: ${6:key}",
71+
" Value: ${7:value}"
72+
],
73+
"description": "",
74+
"scope": "source.cloudformation"
75+
},
76+
"cloudtrail": {
77+
"prefix": "cloudtrail",
78+
"body": [
79+
"${1:cloudTrail}:",
80+
" Type: AWS::CloudTrail::Trail",
81+
" Properties:",
82+
" S3BucketName: ${2}",
83+
" IncludeGlobalServiceEvents: ${3:true | false}",
84+
" IsLogging: ${4:true | false}",
85+
" S3KeyPrefix: ${5}",
86+
" SnsTopicName: ${6}"
87+
],
88+
"description": "",
89+
"scope": "source.cloudformation"
90+
},
4391
"cloudwatch-alarm": {
4492
"prefix": "cloudwatch-alarm",
4593
"body": [
@@ -79,6 +127,33 @@
79127
"description": "",
80128
"scope": "source.cloudformation"
81129
},
130+
"dynamodb-table": {
131+
"prefix": "dynamodb-table",
132+
"body": [
133+
"${1:dynamodbTable}:",
134+
" Type: AWS::DynamoDB::Table",
135+
" Properties:",
136+
" AttributeDefinitions:",
137+
" - ",
138+
" ${2:attribute definition}",
139+
" GlobalSecondaryIndexes:",
140+
" - ",
141+
" ${3:global secondary indexes}",
142+
" LocalSecondaryIndexes:",
143+
" - ",
144+
" ${4:local secondary indexes}",
145+
" KeySchema:",
146+
" - ",
147+
" ${5:key schema}",
148+
" ProvisionedThroughput: ${6}",
149+
" TableName: ${7}",
150+
" Tags:",
151+
" - Key: ${8:key}",
152+
" Value: ${9:value}"
153+
],
154+
"description": "",
155+
"scope": "source.cloudformation"
156+
},
82157
"ec2-instance": {
83158
"prefix": "ec2-instance",
84159
"body": [
@@ -704,7 +779,7 @@
704779
" DisableInboundStageTransitions: ${10}"
705780
],
706781
"description": "",
707-
"scope": "yaml"
782+
"scope": "json"
708783
},
709784
"code-pipeline-stage": {
710785
"prefix": "code-pipeline-stage",
@@ -716,7 +791,7 @@
716791
" - ${3:blockers}"
717792
],
718793
"description": "",
719-
"scope": "yaml"
794+
"scope": "json"
720795
},
721796
"code-pipeline-action": {
722797
"prefix": "code-pipeline-action",
@@ -739,6 +814,6 @@
739814
"RunOrder: ${9:1|2|3|4}"
740815
],
741816
"description": "",
742-
"scope": "yaml"
817+
"scope": "json"
743818
}
744819
}

0 commit comments

Comments
 (0)