Skip to content

Commit b046ccf

Browse files
author
AWS Scripting Guy
committed
more YAML resources
1 parent f83999c commit b046ccf

File tree

3 files changed

+306
-17
lines changed

3 files changed

+306
-17
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,8 @@ Contributing
7373
4. Push to the branch (git push origin my-new-feature)
7474
5. Create new Pull Request
7575

76-
77-
Support my work
78-
-------------------
79-
8076
Donations appreciated :)
81-
77+
-------------------
8278

8379
[![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&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
8480

assets/known_issue1.png

78.1 KB
Loading

snippets/yaml-snippets.json

Lines changed: 305 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,171 @@
11
{
2+
"autoscaling-group-vpc": {
3+
"prefix": "autoscaling-group-vpc",
4+
"body": [
5+
"${1:myAutoscalingGroup}: ",
6+
" Type: AWS::AutoScaling::AutoScalingGroup",
7+
" Properties:",
8+
" AutoScalingGroupName: ${2:asg}",
9+
" AvailabilityZones: !GetAZs ''",
10+
" LaunchConfigurationName: ${3:!Ref LaunchConfig}",
11+
" LoadBalancerNames:",
12+
" - !Ref ElasticLoadBalancer",
13+
" MaxSize: ${4:0}",
14+
" MinSize: ${5:0}",
15+
" VPCZoneIdentifier: ",
16+
" - ${6:vpc-id}",
17+
" Tags: ",
18+
" - Key: ${7:keyname}",
19+
" Value: ${8:value}",
20+
" PropagateAtLaunch: 'true'"
21+
],
22+
"description": "",
23+
"scope": "source.cloudformation"
24+
},
25+
"autoscaling-group": {
26+
"prefix": "autoscaling-group",
27+
"body": [
28+
"${1:asg}:",
29+
" Type: AWS::AutoScaling::AutoScalingGroup",
30+
" Properties:",
31+
" AvailabilityZones: !GetAZs ''",
32+
" LaunchConfigurationName: ",
33+
" MaxSize: 0",
34+
" MinSize: 0",
35+
" Tags:",
36+
" - Key: keyname",
37+
" Value: value",
38+
" PropagateAtLaunch: True|False"
39+
],
40+
"description": "",
41+
"scope": "source.cloudformation"
42+
},
43+
"cloudwatch-alarm": {
44+
"prefix": "cloudwatch-alarm",
45+
"body": [
46+
"${1:cloudWatchAlarm}:",
47+
" Type: AWS::CloudWatch::Alarm",
48+
" Properties:",
49+
" MetricName: ${2}",
50+
" Namespace: ${3}",
51+
" ComparisonOperator: ${4}",
52+
" EvaluationPeriods: ${5}",
53+
" Period: ${6}",
54+
" Statistic: ${7}",
55+
" Threshold: ${8}",
56+
" ActionsEnabled: ${9:true|false}",
57+
" AlarmActions: ${9}",
58+
" AlarmDescription: ${10}",
59+
" AlarmName: ${11}",
60+
" Dimensions: ${12}",
61+
" InsufficientDataActions: ${13}",
62+
" OKActions: ${14}",
63+
" Unit: ${15}"
64+
],
65+
"description": "",
66+
"scope": "source.cloudformation"
67+
},
68+
"ec2-instance": {
69+
"prefix": "ec2-instance",
70+
"body": [
71+
"${1:myEC2Instance}:",
72+
" Type: AWS::EC2::Instance",
73+
" Properties:",
74+
" KeyName: ${2}",
75+
" DisableApiTermination: ${3}",
76+
" ImageId: ${4}",
77+
" InstanceType: ${5}",
78+
" Monitoring: ${6:true|false}",
79+
" SecurityGroupIds:",
80+
" - ${7:sg-id}",
81+
" Userdata: !Base64 |",
82+
" #!/bin/bash -ex",
83+
" # put your script here",
84+
" Tags:",
85+
" - Key: ${8:key}",
86+
" Value: ${9:value}"
87+
],
88+
"description": "",
89+
"scope": "source.cloudformation"
90+
},
91+
"elastic-load-balancer-vpc-internal": {
92+
"prefix": "elastic-load-balancer-vpc-internal",
93+
"body": [
94+
"${1:myELBname}:",
95+
" Type: AWS::ElasticLoadBalancing::LoadBalancer",
96+
" Properties:",
97+
" Scheme: internal",
98+
" SecurityGroups:",
99+
" - ${2:sg-id}",
100+
" Subnets:",
101+
" - ${3:subnet-id}",
102+
" Instances:",
103+
" - ${4:instance-id}",
104+
" Listeners:",
105+
" - LoadBalancerPort: ${5}",
106+
" InstancePort: ${6}",
107+
" Protocol: ${7:HTTP|HTTPS|TCP|SSL}",
108+
" InstanceProtocol: ${8:HTTP|HTTPS|TCP|SSL}",
109+
" - LoadBalancerPort: ${9:'443'}",
110+
" InstancePort: ${10:'443'}",
111+
" Protocol: ${11:HTTPS}",
112+
" InstanceProtocol: ${12:HTTPS}",
113+
" SSLCertificateId: ${13}",
114+
" HealthCheck:",
115+
" Target: TCP:port or HTTPS|HTTP:port/PathToPing",
116+
" HealthyThreshold: ${14}",
117+
" Interval: ${15}",
118+
" Timeout: ${16}",
119+
" UnhealthyThreshold: ${17}"
120+
],
121+
"description": "",
122+
"scope": "source.cloudformation"
123+
},
124+
"rds-dbinstance": {
125+
"prefix": "rds-dbinstance",
126+
"body": [
127+
"${1:rdsDBInstance}:",
128+
" Type: AWS::RDS::DBInstance",
129+
" Properties:",
130+
" AllocatedStorage: ${2}",
131+
" DBInstanceClass: ${3}",
132+
" AllowMajorVersionUpgrade: ${4:true|false}",
133+
" AutoMinorVersionUpgrade: ${5:true|false}",
134+
" AvailabilityZone: ${6}",
135+
" BackupRetentionPeriod: ${7}",
136+
" CharacterSetName: ${8}",
137+
" DBInstanceIdentifier: ${9}",
138+
" DBName: ${10}",
139+
" DBParameterGroupName: ${11}",
140+
" DBSecurityGroups: ",
141+
" - ${12:db-sg-group}",
142+
" DBSnapshotIdentifier: ${13}",
143+
" DBSubnetGroupName: ${14}",
144+
" Engine: ${15:mysql|oracle}",
145+
" EngineVersion: ${16}",
146+
" Iops: ${17}",
147+
" KmsKeyId: ${18}",
148+
" LicenseModel: ${19}",
149+
" MasterUsername: ${20}",
150+
" MasterUserPassword: ${21}",
151+
" MultiAZ: ${22:true|false}",
152+
" OptionGroupName: ${23}",
153+
" Port: ${24}",
154+
" PreferredBackupWindow: ${25}",
155+
" PreferredMaintenanceWindow: ${26}",
156+
" PubliclyAccessible: ${27:true|false}",
157+
" SourceDBInstanceIdentifier: ${28}",
158+
" StorageEncrypted: ${29:true|false}",
159+
" StorageType: ${30}",
160+
" VPCSecurityGroups:",
161+
" - ${31:vpc-sg-id}",
162+
" Tags:",
163+
" - Key: ${32:keyname}",
164+
" Value: ${33:value}"
165+
],
166+
"description": "",
167+
"scope": "source.cloudformation"
168+
},
2169
"start": {
3170
"prefix": "start",
4171
"body": [
@@ -17,29 +184,155 @@
17184
"Outputs:"
18185
]
19186
},
187+
"find-in-map": {
188+
"prefix": "find-in-map",
189+
"body": [
190+
"!FindInMap [ MappingName, keyname, value ]"
191+
],
192+
"description": "!FindInMap [ MappingName, keyname, value ]",
193+
"scope": "source.cloudformation"
194+
},
195+
"get-attr": {
196+
"prefix": "get-attr",
197+
"body": "!GetAtt logicalNameOfResource.attributeName",
198+
"description": "",
199+
"scope": "source.cloudformation"
200+
},
201+
"get-azs": {
202+
"prefix": "get-azs",
203+
"body": "!GetAZs ''",
204+
"description": "",
205+
"scope": "source.cloudformation"
206+
},
207+
"ref": {
208+
"prefix": "ref",
209+
"body": "!Ref logicalName",
210+
"description": "",
211+
"scope": "source.cloudformation"
212+
},
213+
"parameter": {
214+
"prefix": "parameter",
215+
"body": [
216+
"${1:paramName}:",
217+
" Description: ",
218+
" Type: ${3:String|Number|CommaDelimitedList}",
219+
" Default: ${4:-}"
220+
],
221+
"description": "",
222+
"scope": "source.cloudformation"
223+
},
224+
"output": {
225+
"prefix": "output",
226+
"body": [
227+
"${1:LogicalID}:",
228+
" Description: ${2:Information about the value}",
229+
" Value:",
230+
" Export: ",
231+
" Name:"
232+
],
233+
"description": "",
234+
"scope": "source.cloudformation"
235+
},
20236
"tag": {
21237
"prefix": "tag",
22238
"body": [
23-
"Tags:",
24-
"-",
25-
" Key: ${1:keyname1}",
26-
" Value: ${2:value1}",
27-
"-",
28-
" Key: ${3:keyname2}",
29-
" Value: ${4:value2}"
239+
"Key: ${1:keyname}",
240+
"Value: ${2:value}"
30241
]
31242
},
243+
"map": {
244+
"prefix": "map",
245+
"body": [
246+
"${1:mapName}:",
247+
" ${2:mapping01}:",
248+
" ${3:key01}:",
249+
" Name: ${4:value01}",
250+
" ${5:mapping02}:",
251+
" ${6:key02}:",
252+
" Name: ${7:value02}"
253+
],
254+
"description": "",
255+
"scope": "source.cloudformation"
256+
},
257+
"s3-bucket": {
258+
"prefix": "s3-bucket",
259+
"body": [
260+
"${1:s3Bucket}:",
261+
" Type: AWS::S3::Bucket",
262+
" Properties: ",
263+
" AccessControl: ${2:Private | PublicRead | PublicReadWrite | AuthenticatedRead | LogDeliveryWrite | BucketOwnerRead | BucketOwnerFullControl}",
264+
" Bucketname: ${3}",
265+
" CorsConfiguration: ${4}",
266+
" LifecycleConfiguration: ${5}",
267+
" NotificationConfiguration: ${6}",
268+
" VersioningConfiguration: ${7}",
269+
" WebsiteConfiguration: ${8}",
270+
" Tags:",
271+
" - Key: ${9:key}",
272+
" Value: ${10:value}"
273+
],
274+
"description": "",
275+
"scope": "source.cloudformation"
276+
},
277+
"s3-bucketpolicy": {
278+
"prefix": "s3-bucketpolicy",
279+
"body": [
280+
"${1:s3BucketPolicy}:",
281+
" Type: AWS::S3::BucketPolicy",
282+
" Properties:",
283+
" Bucket: ${2}",
284+
" PolicyDocument: ${3}"
285+
],
286+
"description": "",
287+
"scope": "source.cloudformation"
288+
},
289+
"security-group": {
290+
"prefix": "security-group",
291+
"body": [
292+
"${1:secGroupName}:",
293+
" Type: AWS::EC2::SecurityGroup",
294+
" Properties:",
295+
" GroupName: ${2}",
296+
" GroupDescription: ${3}",
297+
" VpcId:${4}",
298+
" SecurityGroupIngress:",
299+
" - ${5:Security Group Rule}",
300+
" SecurityGroupEgress:",
301+
" - ${6:Security Group Rule}",
302+
" Tags:",
303+
" - Key:${7}",
304+
" Value:${8}"
305+
],
306+
"description": "",
307+
"scope": "source.cloudformation"
308+
},
309+
"subnet": {
310+
"prefix": "subnet",
311+
"body": [
312+
"${1:subnetName}:",
313+
" Type: AWS::EC2::Subnet",
314+
" Properties:",
315+
" AvailabilityZone: ${2:zone-id}",
316+
" VpcId: ${3:vpc-id}",
317+
" CidrBlock: ${4:--.--.--.--/--}",
318+
" Tags:",
319+
" - Key: ${5:keyname}",
320+
" Value: ${6:value}"
321+
],
322+
"description": "",
323+
"scope": "source.cloudformation"
324+
},
32325
"vpc": {
33326
"prefix": "vpc",
34327
"body": [
35-
"myVPC:",
328+
"${1:myVPC}:",
36329
" Type: AWS::EC2::VPC",
37330
" Properties:",
38-
" CidrBlock: ${1:--.--.--.--/--}",
39-
" EnableDnsSupport: ${2:true}",
331+
" CidrBlock: ${2:--.--.--.--/--}",
332+
" EnableDnsSupport: ${3:true}",
40333
" Tags:",
41-
" - Key: ${3:keyname}",
42-
" Value: ${4:value}"
334+
" - Key: ${4:keyname}",
335+
" Value: ${5:value}"
43336
]
44337
}
45338
}

0 commit comments

Comments
 (0)