Skip to content

Commit bf257ec

Browse files
author
AWS Scripting Guy
committed
loggroup and sg rules snippets
1 parent ba8f79d commit bf257ec

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

snippets/yaml-snippets.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
32
"autoscaling-group-vpc": {
43
"prefix": "autoscaling-group-vpc",
54
"body": [
@@ -511,6 +510,35 @@
511510
" LaunchTemplateData: ${3}"
512511
]
513512
},
513+
"logs-loggroup": {
514+
"prefix": "logs-loggroup",
515+
"body": [
516+
"${1:logLogGroup}:",
517+
" Type: AWS::Logs::LogGroup",
518+
" Properties:",
519+
" RetentionInDays: ${2}",
520+
" LogGroupName: ${3}"
521+
],
522+
"description": "",
523+
"scope": "source.cloudformation"
524+
},
525+
"logs-metricfilter": {
526+
"prefix": "logs-metricfilter",
527+
"body": [
528+
"${1:logsMetricFilter}:",
529+
" Type: AWS::Logs::MetricFilter",
530+
" Properties:",
531+
" FilterPattern: ${2} # Example: [..., request=*.html*, status_code=4*,]",
532+
" LogGroupName: ${3}",
533+
" MetricTransformations:",
534+
" - ",
535+
" MetricValue: ${4} # Example: \"1\"",
536+
" MetricNamespace: ${5} # Example: \"WebServer/404s\"",
537+
" MetricName: ${6} # Example: \"404Count\""
538+
],
539+
"description": "",
540+
"scope": "source.cloudformation"
541+
},
514542
"rds-dbinstance": {
515543
"prefix": "rds-dbinstance",
516544
"body": [
@@ -1178,6 +1206,28 @@
11781206
"description": "",
11791207
"scope": "source.cloudformation"
11801208
},
1209+
"security-group-egress-cidr": {
1210+
"prefix": "security-group-egress-cidr",
1211+
"body": [
1212+
"IpProtocol: ${1:[tcp|udp|ip]}",
1213+
"FromPort: ${2}",
1214+
"ToPort: ${3}",
1215+
"CidrIp: ${4:--.--.--.--/--}"
1216+
],
1217+
"description": "",
1218+
"scope": "source.cloudformation"
1219+
},
1220+
"security-group-ingress-cidr": {
1221+
"prefix": "security-group-ingress-cidr",
1222+
"body": [
1223+
"IpProtocol: ${1:[tcp|udp|ip]}",
1224+
"FromPort: ${2}",
1225+
"ToPort: ${3}",
1226+
"CidrIp: ${4:--.--.--.--/--}"
1227+
],
1228+
"description": "",
1229+
"scope": "source.cloudformation"
1230+
},
11811231
"subnet": {
11821232
"prefix": "subnet",
11831233
"body": [

0 commit comments

Comments
 (0)