(interactive)
(random t) ;; seed with time-of-day
(with-output-to-temp-buffer "*Tip of the day*"
- (let* ((commands (loop for s being the symbols
+ (let* ((commands (cl-loop for s being the symbols
when (commandp s) collect s))
(command (nth (random (length commands)) commands)))
(princ
(if (file-accessible-directory-p "~/.ssh/sockets")
(setq tramp-ssh-controlmaster-options "-o ControlMaster=auto -o ControlPath='~/.ssh/sockets/ssh.%%C' -o ControlPersist=600"))
#+END_SRC
+
* [[http://www.twmode.sourceforge.net/][twitter]]
#+BEGIN_SRC emacs-lisp :tangle yes
(eval-after-load "cperl-mode"
'(progn
- (add-hook 'cperl-mode-hook (lambda() ((cperl-set-style "K&R"))))
- (setq cperl-close-paren-offset -4)
+ (add-hook 'cperl-mode-hook (lambda() (cperl-set-style "K&R")
+ ;; (setq cperl-close-paren-offset -4)
(setq cperl-continued-statement-offset 4)
(setq cperl-indent-level 4)
(setq cperl-indent-parens-as-block t)
- (setq cperl-tab-always-indent t)))
+ (setq cperl-tab-always-indent t)))))
#+END_SRC
+++ /dev/null
-;;; aws-snippets-autoloads.el --- automatically extracted autoloads
-;;
-;;; Code:
-
-(add-to-list 'load-path (directory-file-name
- (or (file-name-directory #$) (car load-path))))
-
-\f
-;;;### (autoloads nil "aws-snippets" "aws-snippets.el" (0 0 0 0))
-;;; Generated autoloads from aws-snippets.el
-
-(autoload 'aws-snippets-initialize "aws-snippets" "\
-Initialize package.
-
-\(fn)" nil nil)
-
-(eval-after-load 'yasnippet '(aws-snippets-initialize))
-
-(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "aws-snippets" '("aws-snippets-")))
-
-;;;***
-\f
-;;;### (autoloads nil nil ("aws-snippets-pkg.el") (0 0 0 0))
-
-;;;***
-\f
-;; Local Variables:
-;; version-control: never
-;; no-byte-compile: t
-;; no-update-autoloads: t
-;; coding: utf-8
-;; End:
-;;; aws-snippets-autoloads.el ends here
+++ /dev/null
-(define-package "aws-snippets" "20190207.1047" "Yasnippets for AWS"
- '((yasnippet "0.8.0"))
- :keywords
- '("snippets"))
-;; Local Variables:
-;; no-byte-compile: t
-;; End:
+++ /dev/null
-;;; aws-snippets.el --- Yasnippets for AWS
-
-;; Copyright (C) 2018, 2019 Andreas Gerler
-;; keywords: snippets
-;; Version: 0.1.0
-;; Package-Requires: ((yasnippet "0.8.0"))
-
-;; Permission is hereby granted, free of charge, to any person obtaining
-;; a copy of this software and associated documentation files (the
-;; "Software"), to deal in the Software without restriction, including
-;; without limitation the rights to use, copy, modify, merge, publish,
-;; distribute, sublicense, and/or sell copies of the Software, and to
-;; permit persons to whom the Software is furnished to do so, subject to
-;; the following conditions:
-
-;; The above copyright notice and this permission notice shall be
-;; included in all copies or substantial portions of the Software.
-
-;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-;;; Commentary:
-
-;; A collection of yasnippet snippets to be used with AWS CLI as well as JSON for CloudFormation
-
-;;; Code:
-
-(defvar aws-snippets-dir (file-name-directory (or load-file-name
- (buffer-file-name))))
-
-(defcustom aws-snippets-regions '("us-east-1" "eu-west-1" "ap-southeast-1")
- "List of AWS regions for selections."
- :tag "regions"
- :type '(choice (string :tag "Region")
- (repeat :tag "List of Regions"
- (string :tag "Region")))
- :set #'(lambda (symbol new)
- (let ((old (and (boundp symbol)
- (symbol-value symbol))))
- (set-default symbol new)
- ))
- :group 'aws-snippets)
-
-(defcustom aws-snippets-profiles '("test" "prod")
- "List of AWS profiles for selections."
- :tag "profiles"
- :type '(choice (string :tag "Profile")
- (repeat :tag "List of Profiles"
- (string :tag "Profiles")))
- :set #'(lambda (symbol new)
- (let ((old (and (boundp symbol)
- (symbol-value symbol))))
- (set-default symbol new)
- ))
- :group 'aws-snippets)
-
-(defcustom aws-snippets-filters '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "ip-address" "private-ip-address" "network-interface.subnet-id" "description" "name" "iam-instance-profile.arn")
- "List of AWS filters for selections."
- :tag "default-filters"
- :type '(choice (string :tag "Filter")
- (repeat :tag "List of Filters"
- (string :tag "Filter")))
- :set #'(lambda (symbol new)
- (let ((old (and (boundp symbol)
- (symbol-value symbol))))
- (set-default symbol new)
- ))
- :group 'aws-snippets)
-
-(defcustom aws-snippets-ami-ls-query '"reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})"
- "Query string used for ami-ls."
- :tag "ami-ls-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-autoscaling-describe-auto-scaling-groups-query '"AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}"
- "Query string used for autoscaling-describe-auto-scaling-groups."
- :tag "autoscaling-describe-auto-scaling-groups"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-autoscaling-describe-launch-configurations-query '"reverse(sort_by(LaunchConfigurations &CreatedTime)[*].[LaunchConfigurationName, CreatedTime])"
- "Query string used for autoscaling-describe-launch-configurations."
- :tag "autoscaling-describe-launch-configurations-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-dns-names-query '"Reservations[].Instances[?State.Name=='running'].[InstanceId, PublicDnsName]"
- "Query string used for aws-ec2-get-dns-names."
- :tag "ec2-get-dns-names-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-instance-volumes-query '"Reservations[].Instances[].[join(\`,\`,Tags[?Key==\`Name\`].Value),join(' ', BlockDeviceMappings[].Ebs.VolumeId)]"
- "Query string used for ec2-get-instance-volumes."
- :tag "ec2-get-instance-volumes-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-securitygroups-query '"sort_by(SecurityGroups, &GroupName)[*].[GroupName, GroupId, Description]"
- "Query string used for ec2-get-securitygroups."
- :tag "ec2-get-securitygroups-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-snapshots-query '"Snapshots[].[join(\`,\`,Tags[?Key==\`Name\`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]"
- "Query string used for ec2-get-snapshots-query."
- :tag "ec2-get-snapshots-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-volumes-query '"Volumes[].[VolumeId,State,SnapshotId,join(\`,\`,Tags[?Key==\`Name\`].Value)]"
- "Query string used for ec2-get-volumes-query."
- :tag "ec2-get-volumes-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-get-volumes-unused-query '"Volumes[].[VolumeId,Size,VolumeType,CreateTime,State,SnapshotId]"
- "Query string used for ec2-get-volumes-unused-query."
- :tag "ec2-get-volumes-unused-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-instance-running-query '"Reservations[].Instances[].[InstanceId, State.Name]"
- "Query string used for ec2-instance-running."
- :tag "ec2-instance-running-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-list-instances-query '("Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime]"
- "Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime, IamInstanceProfile.Arn]"
- "Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime, KeyName]")
- "Query string used for ec2 describe-instances."
- :tag "ec2-list-instances-query"
- :type '(choice (string :tag "Query")
- (repeat :tag "List of Queries"
- (string :tag "Query")))
- :set #'(lambda (symbol new)
- (let ((old (and (boundp symbol)
- (symbol-value symbol))))
- (set-default symbol new)
- ))
- :group 'aws-snippets)
-
-(defcustom aws-snippets-ec2-list-subnets-query '"sort_by(sort_by(Subnets[].{VpcId:VpcId, SubnetId:SubnetId, State:State, AvailabilityZone:AvailabilityZone, CidrBlock:CidrBlock, AvailableIpAddressCount:AvailableIpAddressCount Tags:to_string(Tags[].[Key, Value])}, &SubnetId), &VpcId)"
- "Query string used for ec2-list-subnets."
- :tag "ec2-list-subnets-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-ec2-list-vpcs-query '"sort_by(Vpcs[].{VpcId:VpcId, State:State, AvailabilityZone:AvailabilityZone, CidrBlock:CidrBlock, AvailableIpAddressCount:AvailableIpAddressCount Tags:to_string(Tags[].[Key, Value])}, &VpcId)"
- "Query string used for ec2-list-vpcs."
- :tag "ec2-list-vpcs-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-elb-get-list-query '"reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName, CreatedTime])"
- "Query string used for elb-get-list."
- :tag "elb-get-list-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-emr-list-clusters-query '"Clusters[*].{ID: Id, NAME: Name}"
- "Query string used for emr-list-clusters."
- :tag "emr-list-clusters-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-rds-describe-instances-query '"DBInstances[*].[DBInstanceIdentifier,DbiResourceId, Endpoint.Address]"
- "Query string used for rds describe-db-instances."
- :tag "rds-describe-db-instances-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-route53-list-hosted-zones-query '"HostedZones[].[Id, Name]"
- "Query string used for route53 list-hosted-zones."
- :tag "route53-list-hosted-zones-query"
- :group 'aws-snippets
- :type 'string)
-
-(defcustom aws-snippets-aws-support-ls-query '"reverse(sort_by(cases, &timeCreated)[].[caseId, subject, timeCreated, displayId])"
- "Query string used for aws support-ls-query."
- :tag "aws-support-ls-query"
- :group 'aws-snippets
- :type 'string)
-
-;;;###autoload
-(defun aws-snippets-initialize ()
- "Initialize package."
- (let ((snip-dir (expand-file-name "snippets" aws-snippets-dir)))
- (when (boundp 'yas-snippet-dirs)(add-to-list 'yas-snippet-dirs snip-dir t))
- (yas-load-directory snip-dir)))
-
-;;;###autoload
-(eval-after-load 'yasnippet
- '(aws-snippets-initialize))
-
-(require 'yasnippet)
-
-(provide 'aws-snippets)
-;;; aws-snippets.el ends here
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ami-ls
-# key: ami-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-images --owners \$`(if (string-equal major-mode "eshell-mode")(message "{")(message "("))` aws --profile=$1 ec2 describe-security-groups --group-names 'Default' --query 'SecurityGroups[0].OwnerId' --output text `(if (string-equal major-mode "eshell-mode")(message "}")(message ")"))` --query "`(print aws-snippets-ami-ls-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-describe-auto-scaling-groups
-# key: asg-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling describe-auto-scaling-groups --query '`(print aws-snippets-autoscaling-describe-auto-scaling-groups-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-describe-launch-configurations
-# key: asl-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling describe-launch-configurations --query '`(print aws-snippets-autoscaling-describe-launch-configurations-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-update-auto-scaling-group-min-max
-# key: aws-autoscaling-update-auto-scaling-group-min-max
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling update-auto-scaling-group --auto-scaling-group-name ${4:`(current-kill 0)`} --min-size $5 --max-size $6 $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-change-ls
-# key: cloud-change-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation list-change-sets --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-create-change-set
-# key: cloud-createchange
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} \
-${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} \
-cloudformation create-change-set \
-${4:--capabilities CAPABILITY_NAMED_IAM} \
---stack-name '$5' \
---change-set-name '$6' \
---description '$7' \
---parameters ${8:file://} \
-${9:--change-set-type=${10:$$(yas-choose-value '("CREATE" "UPDATE"))}}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-describe-change-set
-# key: cloud-descchange
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-change-set --stack-name ${4:`(current-kill 0)`} --change-set-name $5 --output ${6:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-describe-stack
-# key: cloud-desc
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-stacks --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-describe-stack-events
-# key: cloud-events-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-stack-events --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-ls
-# key: cloud-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation list-stacks --stack-status-filter ${4:$$(yas-choose-value '(
-"CREATE_COMPLETE"
-"CREATE_IN_PROGRESS"
-"CREATE_FAILED"
-"ROLLBACK_IN_PROGRESS"
-"ROLLBACK_FAILED"
-"ROLLBACK_COMPLETE"
-"DELETE_IN_PROGRESS"
-"DELETE_FAILED"
-"DELETE_COMPLETE"
-"UPDATE_IN_PROGRESS"
-"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"
-"UPDATE_COMPLETE"
-"UPDATE_ROLLBACK_IN_PROGRESS"
-"UPDATE_ROLLBACK_FAILED"
-"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS"
-"UPDATE_ROLLBACK_COMPLETE"
-"REVIEW_IN_PROGRESS"
-"CREATE_IN_PROGRESS CREATE_FAILED CREATE_COMPLETE ROLLBACK_IN_PROGRESS ROLLBACK_FAILED ROLLBACK_COMPLETE DELETE_IN_PROGRESS DELETE_FAILED UPDATE_IN_PROGRESS UPDATE_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_COMPLETE UPDATE_ROLLBACK_IN_PROGRESS UPDATE_ROLLBACK_FAILED UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_ROLLBACK_COMPLETE REVIEW_IN_PROGRESS"
-))} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-validate-template
-# key: cloud-val-temp
-# group: aws
-# --
-aws --profile=test --region=us-east-1 cloudformation validate-template --template-body file://${1:`(current-kill 0)`} --output ${2:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudtrail-lookup-events
-# key: cloudtrail-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudtrail lookup-events --max-items ${4:100} --lookup-attributes AttributeKey=${5:$$(yas-choose-value '("ResourceType,AttributeValue=AWS::EC2::Instance" "ResourceName,AttributeValue="))}$6 --output ${7:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-delete-snapshot (yank)
-# key: snap-del
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 delete-snapshot --snapshot-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-delete-volume (yank)
-# key: ebs-del
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 delete-volume --volume-id ${4:`(current-kill 0)`} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-describe-instance-attribute (yank)
-# key: ec2-attribute
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-attribute --instance-id ${4:`(current-kill 0)`} --attribute ${5:$$(yas-choose-value '("instanceType" "kernel" "ramdisk" "userData" "disableApiTermination" "instanceInitiatedShutdownBehavior" "rootDeviceName" "blockDeviceMapping" "productCodes" "sourceDestCheck" "groupSet" "ebsOptimized" "sriovNetSupport"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-describe-instance-status (yank)
-# key: aws-ec2-describe-instance-status
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-status --instance-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-describe-userdata (yank)
-# key: ec2-userdata
-# group: aws
-# --
-(base64-decode-string (shell-command-to-string "aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-attribute --instance-id ${4:`(current-kill 0)`} --attribute userData --query 'UserData.Value' --output text"))$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-console-output (yank)
-# key: ec2-console
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 get-console-output --output text --instance-id ${4:`(current-kill 0)`} >#<buffer *$4-console-output*> $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-dns-names
-# key: aws-ec2-get-dns-names
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --filters "Name=tag:Name,Values=$4" --query "`(print aws-snippets-ec2-get-dns-names-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-instance-details (yank)
-# key: ec2-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --instance-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-instance-volumes
-# key: ec2-vol
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query "`(print aws-snippets-ec2-get-instance-volumes-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-securitygroup-details (yank)
-# key: sg-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-groups --group-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-securitygroup-references (yank)
-# key: aws-ec2-get-securitygroup-references
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-group-references --group-id ${4:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-securitygroups
-# key: sg-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-groups --query "`(print aws-snippets-ec2-get-securitygroups-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-snapshot-details (yank)
-# key: snap-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --snapshot-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-snapshots
-# key: snap-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --query '`(print aws-snippets-ec2-get-snapshots-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-volumes
-# key: ebs-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --query '`(print aws-snippets-ec2-get-volumes-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-get-volumes-unused
-# key: ebs-ls-avail
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --query '`(print aws-snippets-ec2-get-volumes-unused-query)`' --filters Name=status,Values=available --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-instance-running
-# key: ec2state
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --instance-ids ${4:`(current-kill 0)`} --query "`(print aws-snippets-ec2-instance-running-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-list-instances
-# key: ec2-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query '${4:$$(yas-choose-value aws-snippets-ec2-list-instances-query)}' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-list-subnets
-# key: sub-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-subnets --query "`(print aws-snippets-ec2-list-subnets-query)`" --output ${4:$$(yas-choose-value '("table" "text" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-list-vpcs
-# key: vpc-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-vpcs --query "`(print aws-snippets-ec2-list-vpcs-query)`" --output ${4:$$(yas-choose-value '("table" "text" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-start-stop-instance (yank)
-# key: ec2-start
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 ${4:$$(yas-choose-value '("start-instances" "stop-instances" "reboot-instances"))} --instance-ids ${5:`(current-kill 0)`} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-volume-details (yank)
-# key: ebs-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --volume-ids ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-describe-instance-health (yank)
-# key: aws-elb-describe-instance-health
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-instance-health --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-describe-load-balancer (yank)
-# key: elb-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancers --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-describe-load-balancer-attributes (yank)
-# key: aws-elb-describe-load-balancer-attributes
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancer-attributes --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-get-list
-# key: elb-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancers --query "`(print aws-snippets-elb-get-list-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-search
-# key: aws-elb-search
-# group: aws
-# --
-for REGION in `(mapconcat 'identity aws-snippets-regions " ")`; do
- for BALANCER in \`aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=\${REGION} elb describe-load-balancers --query "reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName])" --output text\`; do
- aws --profile=$1 --region=\${REGION} elb describe-load-balancers --load-balancer-name \${BALANCER} --output text | awk "{print \\"\${REGION}:\${BALANCER}:\\"\\\$0}"
- done
-done $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-emr-describe-cluster (yank)
-# key: aws-emr-describe-cluster
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=${2:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} emr describe-cluster --cluster-id ${3: `(current-kill 0)`} --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-emr-list-clusters
-# key: emr-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=${2:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} emr list-clusters --active --query '`(print aws-snippets-emr-list-clusters-query)`' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-filters
-# key: awsfil
-# group: aws
-# --
---filters "Name=${1:$$(yas-choose-value aws-snippets-filters)},Values=$2" $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-logs-get-groups
-# key: logs-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} logs describe-log-groups --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-logs-set-retention
-# key: logs-set-ret
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} logs put-retention-policy --log-group-name ${4:`(current-kill 0)`} --retention-in-days ${5:$$(yas-choose-value '( "60" "1" "3" "5" "7" "14" "30" "90" "120" "150" "180" "365" "400" "545" "731" "1827" "3653"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-policy-ls
-# key: policy-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} iam list-policies --scope ${5:$$(yas-choose-value '("All" "AWS" "Local"))} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-describe-db-instance-details (yank)
-# key: rds-det
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-instances --db-instance-identifier ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-describe-db-instances
-# key: rds-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-instances --query "`(print aws-snippets-rds-describe-instances-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-describe-db-parameter-groups
-# key: aws-rds-describe-db-parameter-groups
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-parameter-groups --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-describe-parameters (yank)
-# key: aws-rds-describe-parameters
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-parameters --db-parameter-group-name ${4:`(current-kill 0)`} --query "Parameters[*][ParameterName, ParameterValue]" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-region-loop
-# key: aws-region-loop
-# group: aws
-# --
-for REGION in `(mapconcat 'identity aws-snippets-regions " ")`; do
-$0
-done
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-regions
-# key: awsreg
-# group: aws
-# --
---region=${1:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-list-hosted-zones
-# key: r53-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} route53 list-hosted-zones --query '`(print aws-snippets-route53-list-hosted-zones-query)`' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-list-resource-record-sets (yank)
-# key: aws-route53-list-resource-record-sets
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} route53 list-resource-record-sets --hosted-zone-id ${2:`(current-kill 0)`} --query \"ResourceRecordSets[?contains(Name, '$3')]\" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sns-ls
-# key: sns-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} sns list-topics --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-support-describe
-# key: support-desc
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} support describe-communications --case-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-support-ls
-# key: support-ls
-# group: aws
-# --
-aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} support describe-cases --no-include-communications --query "`(print aws-snippets-aws-support-ls-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-group
-# key: autoscaling-group
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:-}" : {
- "Type" : "AWS::AutoScaling::AutoScalingGroup",
- "Properties" : {
- "AvailabilityZones" : [${2:"--"}],
- "LaunchConfigurationName" : ${3:"--"},
- "MaxSize" : "${4:--}",
- "MinSize" : "${5:--}",
- "Tags" : [ {"Key" : "Name",
- "Value" : "${6:"--"}",
- "PropagateAtLaunch" : "True"}
- ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-group-vpc
-# key: autoscaling-group-vpc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:-}" : {
- "Type" : "AWS::AutoScaling::AutoScalingGroup",
- "Properties" : {
- "AvailabilityZones" : [
- ${2:azs}
- ],
- "LaunchConfigurationName" : ${3:"-"},
- "MaxSize" : "${4:-}",
- "MinSize" : "${5:-}",
- "VPCZoneIdentifier" : [ ${6:list of subnet ids} ],
- "Tags" : [ {"Key" : "Name",
- "Value" : "${7:-}",
- "PropagateAtLaunch" : "True"}
- ]
- }
-}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-availibility-zone
-# key: availability-zone
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{"Fn::Join" : ["",[{"Ref" : "AWS::Region"},"${1:a}" ] ]}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-authentication
-# key: cloudformation-authentication
-# group: cloudformation
-# --
-"AWS::CloudFormation::Authentication": {
- "${1:AccessCreds}": {
- "type": "$2",
- "buckets": [ "$3" ],
- "roleName": "$4",
- "accessKeyId": "$5",
- "secretKey": "$6",
- "uris": [ "$7" ],
- "username": "$8",
- "password": "$9"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-customresource
-# key: cloudformation-customresource
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:customResource}": {
- "Type": "AWS::CloudFormation::CustomResource",
- "Version": "1.0",
- "Properties": {
- "ServiceToken": "$2"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-init
-# key: cloudformation-init
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"AWS::CloudFormation::Init": {
- "config": {
- "packages": {
- $0
- },
- "groups": {
- },
- "users": {
- },
- "sources": {
- },
- "files": {
- },
- "commands": {
- },
- "services": {
- }
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-stack
-# key: cloudformation-stack
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:cloudFormationStack}": {
- "Type": "AWS::CloudFormation::Stack",
- "Properties": {
- "NotificationARNs": [ "$2" ],
- "Parameters": { $3 },
- "TemplateURL": "$4",
- "TimeoutInMinutes": "$5"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-waitcondition
-# key: cloudformation-waitcondition
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:waitCondition}": {
- "Type": "AWS::CloudFormation::WaitCondition",
- "Properties": {
- "Count": "$2",
- "Handle": "$3",
- "Timeout": "$4"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-waitconditionhandle
-# key: cloudformation-waitconditionhandle
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:waitConditionHandle}": {
- "Type" : "AWS::CloudFormation::WaitConditionHandle",
- "Properties" : {
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudfront-distribution
-# key: cloudfront-distribution
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:cloudfrontDistribution}": {
- "Type": "AWS::CloudFront::Distribution",
- "Properties": {
- "DistributionConfig": $2
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudtrail
-# key: cloudtrail
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:cloudTrail}": {
- "Type": "AWS::CloudTrail::Trail",
- "Properties": {
- "S3BucketName": "$2",
- "IncludeGlobalServiceEvents": "${3:$$(yas-choose-value '("true" "false")}",
- "IsLogging": "${4:$$(yas-choose-value '("true" "false"))}",
- "S3KeyPrefix": "$5",
- "SnsTopicName": "$6"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudwatch-alarm
-# key: cloudwatch-alarm
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:cloudWatchAlarm}": {
- "Type": "AWS::CloudWatch::Alarm",
- "Properties": {
- "MetricName": "$2",
- "Namespace": "$3",
- "ComparisonOperator": "$4",
- "EvaluationPeriods": "$5",
- "Period": "$6",
- "Statistic": "$7",
- "Threshold": "$8",
- "ActionsEnabled": "${9:$$(yas-choose-value '("true" "false"))}",
- "AlarmActions": [ "$10" ],
- "AlarmDescription": "$11",
- "AlarmName": "$12",
- "Dimensions": [ "$13" ],
- "InsufficientDataActions": [ "$14" ],
- "OKActions": [ "$15" ],
- "Unit": "$16"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-dynamodb-table
-# key: dynamodb-table
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:dynamodbTable}": {
- "Type": "AWS::DynamoDB::Table",
- "Properties": {
- "AttributeDefinitions": [ $2 ],
- "GlobalSecondaryIndexes": [ $3 ],
- "KeySchema": [ $4 ],
- "LocalSecondaryIndexes": [ $5 ],
- "ProvisionedThroughput": { $6 },
- "TableName": "$7"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-instance
-# key: ec2-instance
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:-}": {
- "Type": "AWS::EC2::Instance",
- "Properties": {
- "KeyName": ${2:-},
- "DisableApiTermination": "${3:$$(yas-choose-value '("true" "false"))}",
- "ImageId": { ${4:-} },
- "InstanceType": "${5:-}",
- "Monitoring": "${6:$$(yas-choose-value '("true" "false"))}",
- "SecurityGroupIds" : [${7:-}],
- "Tags": [
- {
- "Key": "${8:-}",
- "Value": "${9:-}"
- }
- ],
- "UserData": {
- "Fn::Base64": {
- "Fn::Join": [
- "",
- [
- "#!/bin/bash -ex",
- "${10:-}"
- ]
- ]
- }
- }
- }
-}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-volume
-# key: ec2-volume
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:ec2Volume}": {
- "Type": "AWS::EC2::Volume",
- "Properties": {
- "AutoEnableIO": "${2:$$(yas-choose-value '("true" "false"))}",
- "AvailabilityZone": "${3:-}",
- "Encrypted": "${4:$$(yas-choose-value '("true" "false"))}",
- "KmsKeyId": "${5:-}",
- "Size": "${6:-}",
- "SnapshotId": "${7:snap-}",
- "Tags": [
- {
- "Key": "${8:-}",
- "Value": "${9:-}"
- }
- ],
- "VolumeType" : "${10:$$(yas-choose-value '("standard" "io1" "gp2"))}"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-eip-vpc
-# key: eip-vpc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:eipName}": {
- "Type": "AWS::EC2::EIP",
- "Properties": {
- "Domain": "vpc",
- "InstanceId": ${2:"--"}
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elastic-load-balancer
-# key: elastic-load-balancer
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:-}": {
- "Type": "AWS::ElasticLoadBalancing::LoadBalancer",
- "Properties": {
- "AvailabilityZones" : [ "${2:-}" ],
- "Listeners" : [ ${3:-} ],
- "Tags": [
- {
- "Key": "${4:-}",
- "Value": "${5:-}"
- }
- ]
- }
-}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elastic-load-balancer-vpc
-# key: elastic-load-balancer-vpc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:-}": {
- "Type": "AWS::ElasticLoadBalancing::LoadBalancer",
- "Properties": {
- "Listeners" : [ ${2:-} ],
- "SecurityGroups" : [ ${3:-} ],
- "Subnets" : [ ${4:-} ],
- "Tags": [
- {
- "Key": "${5:-}",
- "Value": "${6:-}"
- }
- ]
- }
-}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elastic-load-balancer-vpc-internal
-# key: elastic-load-balancer-vpc-internal
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:-}": {
- "Type": "AWS::ElasticLoadBalancing::LoadBalancer",
- "Properties": {
- "Listeners" : [ ${2:-} ],
- "Scheme" : "internal",
- "SecurityGroups" : [ ${3:-} ],
- "Subnets" : [ ${4:-} ],
- "Tags": [
- {
- "Key": "${5:-}",
- "Value": "${6:-}"
- }
- ]
- }
-}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-cachecluster
-# key: elasticche-cachecluster
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:elasticacheCacheCluster}": {
- "Type": "AWS::ElastiCache::CacheCluster",
- "Properties":
- {
- "AutoMinorVersionUpgrade": "${2:$$(yas-choose-value '("true" "false"))}",
- "AZMode": "$3",
- "CacheNodeType": "$4",
- "CacheParameterGroupName": "$5",
- "CacheSecurityGroupNames": [ "$6" ],
- "CacheSubnetGroupName": "$7",
- "ClusterName": "$8",
- "Engine": "$9",
- "EngineVersion": "$10",
- "NotificationTopicArn": "$11",
- "NumCacheNodes": "$12",
- "Port": "$13",
- "PreferredAvailabilityZone": "$14",
- "PreferredAvailabilityZones": [ "$15" ],
- "PreferredMaintenanceWindow": "$16",
- "SnapshotArns": ["$17" ],
- "SnapshotRetentionLimit": "$18",
- "SnapshotWindow": "$19",
- "VpcSecurityGroupIds": [ "$20" ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-parametergroup
-# key: elasticache-parametergroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:elastiicacheParameterGroup}": {
- "Type": "AWS::ElastiCache::ParameterGroup",
- "Properties": {
- "CacheParameterGroupFamily": "$2",
- "Description": "$3",
- "Properties": { "$4": "$5" }
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-securitygroup
-# key: elasticache-securitygroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:elasticacheSecurityGroup}": {
- "Type": "AWS::ElastiCache::SecurityGroup",
- "Properties":
- {
- "Description": "$2"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-securitygroupingress
-# key: elasticache-securitygroupingress
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:elasticacheSecurityGroupIngress}": {
- "Type": "AWS::ElastiCache::SecurityGroupIngress",
- "Properties":
- {
- "CacheSecurityGroupName": "$2",
- "EC2SecurityGroupName": "$3",
- "EC2SecurityGroupOwnerId": "$4"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-subnetgroup
-# key: elasticache-subnetgroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:elasticacheSubnetGroup}": {
- "Type": "AWS::ElastiCache::SubnetGroup",
- "Properties": {
- "Description": "$2",
- "SubnetIds": [ "$3" ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticbeanstalk-application
-# key: elasticbeanstalk-application
-# group: cloudformation
-# --
-"${1:elasticbeanstalkApplication}": {
- "Type": "AWS::ElasticBeanstalk::Application",
- "Properties": {
- "ApplicationName": "$2",
- "Description": "$3"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticbeanstalk-applicationversion
-# key: elasticbeanstalk-applicationversion
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:elasticbeanstalkApplicationVersion}": {
- "Type": "AWS::ElasticBeanstalk::ApplicationVersion",
- "Properties": {
- "ApplicationName": "$2",
- "Description": "$3",
- "SourceBundle": { $4 }
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticbeanstalk-configurationtemplate
-# key: elasticbeanstalk-configurationtemplate
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:elasticbeanstalkConfigurationTemplate}": {
- "Type": "AWS::ElasticBeanstalk::ConfigurationTemplate",
- "Properties": {
- "ApplicationName": "$2",
- "Description": "$3",
- "EnvironmentId": "$4",
- "OptionSettings": [ $5 ],
- "SolutionStackName": "$6",
- "SourceConfiguration": $7
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticbeanstalk-environment
-# key: elasticbeanstalk-environment
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:elasticbeanstalkEnvironment}": {
- "Type": "AWS::ElasticBeanstalk::Environment",
- "Properties": {
- "ApplicationName": "$2",
- "CNAMEPrefix": "$3",
- "Description": "$4",
- "EnvironmentName": "$5",
- "OptionSettings": [ $6 ],
- "SolutionStackName": "$7",
- "TemplateName": "$8",
- "Tier": "$9",
- "VersionLabel": "$10"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-listener
-# key: elb-listener
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{
- "InstancePort" : "${1:-}",
- "InstanceProtocol" : "${2:$$(yas-choose-value '("HTTP" "HTTPS" "TCP" "SSL"))}",
- "LoadBalancerPort" : "${3:-}",
- "Protocol" : "${4:$$(yas-choose-value '("HTTP" "HTTPS" "TCP" "SSL"))}"
-}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-find-in-map
-# key: find-in-map
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"Fn::FindInMap": [
- "${1:map}",
- "${2:selector}",
- "${3:value}"
-]$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-get-attr
-# key: get-attr
-# group: cloudformation
-# --
-{ "Fn::GetAtt" : [ "${1:logicalNameOfResource}", "${2:attributeName}" ]}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-accesskey
-# key: iam-accesskey
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:iamAccessKey}": {
- "Type": "AWS::IAM::AccessKey",
- "Properties": {
- "Status": "$2",
- "UserName": "$3",
- "Serial": "$4"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-group
-# key: iam-group
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:iamGroup}": {
- "Type": "AWS::IAM::Group",
- "Properties": {
- "Path": "$2",
- "Policies": [ "$3" ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-instanceprofile
-# key: iam-instanceprofile
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:iamInstanceProfile}": {
- "Type": "AWS::IAM::InstanceProfile",
- "Properties": {
- "Path": "${2:/}",
- "Roles": [ "$3" ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-policy
-# key: iam-policy
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:iamPolicy}": {
- "Type": "AWS::IAM::Policy",
- "Properties": {
- "Groups" : [ "$2" ],
- "PolicyDocument" : {$3},
- "PolicyName" : "$4",
- "Roles" : [ "$5" ],
- "Users" : [ "$6" ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-role
-# key: iam-role
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:iamRole}": {
- "Type": "AWS::IAM::Role",
- "Properties": {
- "AssumeRolePolicyDocument": { $2 },
- "Path": "$3",
- "Policies": [ $4 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-user
-# key: iam-user
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:iamUser}": {
- "Type": "AWS::IAM::User",
- "Properties": {
- "Path": "${2:/}",
- "Groups": [ "$3" ],
- "LoginProfile": { "Password" : "$4" },
- "Policies": [ $5 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-usertogroupaddition
-# key: iam-usertogroupaddition
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:iamUserToGroupAddition}": {
- "Type": "AWS::IAM::UserToGroupAddition",
- "Properties": {
- "GroupName": "$2",
- "Users": [ "$3" ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-internet-gateway
-# key: internet-gateway
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:igwName}": {
- "Type": "AWS::EC2::InternetGateway",
- "Properties": {
- "Tags": [${2:"-"}]
- }
-},
-"AttachGateway": {
- "Type": "AWS::EC2::VPCGatewayAttachment",
- "Properties": {
- "VpcId": ${3:"--"},
- "InternetGatewayId": { "Ref": "$1" }
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-join
-# key: join
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{"Fn::Join" : ["",[ ${1:"prefix"}, ${2:"suffix"} ] ]}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-kinesis-stream
-# key: kinesis-stream
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:kinesisStream}": {
- "Type": "AWS::Kinesis::Stream",
- "Properties": {
- "ShardCount": "$2"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-launch-config
-# key: launch-config
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:launchConfigName}": {
- "Type" : "AWS::AutoScaling::LaunchConfiguration",
- "Properties" : {
- "IamInstanceProfile" : ${2:"--"},
- "ImageId" : ${3:"--"},
- "InstanceMonitoring" : ${4:"--"},
- "InstanceType" : "${5:--}",
- "KeyName" : ${6:"--"},
- "SecurityGroups" : [ ${7:"--"} ],
- "UserData" : {
- "Fn::Base64":
- { "Fn::Join": [
- "",
- [
- "#!/bin/bash -ex",
- "${8:-}"
- ]
- ]
- }
- }
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-logs-loggroup
-# key: logs-loggroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:logLogGroup}": {
- "Type": "AWS::Logs::LogGroup",
- "Properties": {
- "RetentionInDays": "${2}"
- }
-}
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-logs-metricfilter
-# key: logs-metricfilter
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:logsMetricFilter}": {
- "Type": "AWS::Logs::MetricFilter",
- "Properties": {
- "FilterPattern": [ "$2" ],
- "LogGroupName": "$3",
- "MetricTransformations": [ $4 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-map
-# key: map
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:mapName}": {
- "${2:selector}": {
- "${3:key}": "${4:val}"
- },
- "${5:selector}": {
- "${6:key}": "${7:val}"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-map-item
-# key: map-item
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:selector}": {
-"${2:key}": "${3:val}"
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-app
-# key: opsworks-app
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:opsworksApp}": {
- "Type": "AWS::OpsWorks::App",
- "Properties": {
- "Name": "$2",
- "StackId": "$3",
- "Type": "$4",
- "AppSource": { $5 },
- "Attributes": { $6:$7 },
- "Description": "$8",
- "Domains": [ "$9" ],
- "EnableSsl": "${10:$$(yas-choose-value '("true" "false"))}",
- "Shortname": "$11",
- "SslConfiguration": { $12 }
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-elasticloadbalancerattachment
-# key: opsworks-elasticloadbalancerattachment
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:opsworksElasticLoadBalancerAttachment}": {
- "Type": "AWS::OpsWorks::ElasticLoadBalancerAttachment",
- "Properties": {
- "ElasticLoadBalancerName": "$2",
- "LayerId": "$3"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-instance
-# key: opsworks-instance
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:opsworksInstance}": {
- "Type": "AWS::OpsWorks::Instance",
- "Properties": {
- "InstanceType": "$2",
- "LayerIds": [ "$3" ],
- "StackId": "$4",
- "AmiId": "$5",
- "Architecture": "$6",
- "AutoScalingType": "$7",
- "AvailabilityZone": "$8",
- "InstallUpdatesOnBoot": "${9:$$(yas-choose-value '("true" "false"))}",
- "Os": "$10",
- "RootDeviceType": "$11",
- "SshKeyName": "$12",
- "SubnetId": "$13",
- "TimeBasedAutoScaling": { $14 }
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-layer
-# key: opsworks-layer
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:opsworksLayer}": {
- "Type": "AWS::OpsWorks::Layer",
- "Properties": {
- "AutoAssignElasticIps": "${2:$$(yas-choose-value '("true" "false"))}",
- "AutoAssignPublicIps": "${3:$$(yas-choose-value '("true" "false"))}",
- "EnableAutoHealing": "${4:$$(yas-choose-value '("true" "false"))}",
- "Name": "$5",
- "Shortname": "$6",
- "StackId": "$7",
- "Type": "$8",
- "Attributes": { "$9":"$10" },
- "CustomInstanceProfileArn": "$11",
- "CustomRecipes": $12,
- "CustomSecurityGroupIds": [ "$13" ],
- "InstallUpdatesOnBoot": "${14:$$(yas-choose-value '("true" "false"))}",
- "LoadBasedAutoScaling": { $15 },
- "Packages": [ "$16" ],
- "VolumeConfigurations": [ $17 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-stack
-# key: opsworks-stack
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:opsworksStack}": {
- "Type": "AWS::OpsWorks::Stack",
- "Properties": {
- "DefaultInstanceProfileArn": "$2",
- "Name": "$3",
- "ServiceRoleArn": "$4",
- "Attributes": { "$5":"$6" },
- "ChefConfiguration": { $7 },
- "ConfigurationManager": { $8 },
- "CustomCookbooksSource": { $9 },
- "CustomJson": { $10 },
- "DefaultAvailabilityZone": "$11",
- "DefaultOs": "$12",
- "DefaultRootDeviceType": "$13",
- "DefaultSshKeyName": "$14",
- "DefaultSubnetId": "$15",
- "HostnameTheme": "$16",
- "UseCustomCookbooks": "${17:$$(yas-choose-value '("true" "false"))}",
- "UseOpsworksSecurityGroups": "${18:$$(yas-choose-value '("true" "false"))}",
- "VpcId": "$19"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-output
-# key: output
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:name}": {
- "Value": "${2:Value to return}",
- "Description": "${3:Information about the value}",
- "Export": {
- "Name": "${4:Value to export}"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-parameter
-# key: parameter
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:paramName}": {
- "Description": "${2:-}",
- "Type": "${3:$$(yas-choose-value '("String" "Number" "CommaDelimitedList"))}",
- "Default": "${4:-}"
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbinstance
-# key: rds-dbinstance
-# group: cloudformation
-# --
-"${1:rdsDBInstance}": {
- "Type": "AWS::RDS::DBInstance",
- "Properties": {
- "AllocatedStorage": "${2}",
- "DBInstanceClass": "${3}",
- "AllowMajorVersionUpgrade": "${4:$$(yas-choose-value '("true" "false"))}",
- "AutoMinorVersionUpgrade": "${5:$$(yas-choose-value '("true" "false"))}",
- "AvailabilityZone": "$6",
- "BackupRetentionPeriod": "$7",
- "CharacterSetName": "$8",
- "DBInstanceIdentifier": "$9",
- "DBName": "$10",
- "DBParameterGroupName": "$11",
- "DBSecurityGroups": [ "$12" ],
- "DBSnapshotIdentifier": "$13",
- "DBSubnetGroupName": "$14",
- "Engine": "$15",
- "EngineVersion": "$16",
- "Iops": "$17",
- "KmsKeyId": "$18",
- "LicenseModel": "$19",
- "MasterUsername": "$20",
- "MasterUserPassword": "$21",
- "MultiAZ": "${22:$$(yas-choose-value '("true" "false"))}",
- "OptionGroupName": "$23",
- "Port": "$24",
- "PreferredBackupWindow": "$25",
- "PreferredMaintenanceWindow": "$26",
- "PubliclyAccessible": "${27:$$(yas-choose-value '("true" "false"))}",
- "SourceDBInstanceIdentifier": "$28",
- "StorageEncrypted": "${29:$$(yas-choose-value '("true" "false"))}",
- "StorageType": "$30",
- "Tags": [ $31 ],
- "VPCSecurityGroups": [ "$32" ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbparametergroup
-# key: rds-dbparametergroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:rdsDBParameterGroup}": {
- "Type": "AWS::RDS::DBParameterGroup",
- "Properties": {
- "Description": "$2",
- "Family": "$3",
- "Parameters": {$4},
- "Tags": [ $5 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbsecuritygroup
-# key: rds-dbsecuritygroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:rdsDBSecurityGroup}": {
- "Type": "AWS::RDS::DBSecurityGroup",
- "Properties": {
- "EC2VpcId": { $2 },
- "DBSecurityGroupIngress": [ $3 ],
- "GroupDescription": "$4",
- "Tags": [ $5 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbsecuritygroupingress
-# key: rds-dbsecuritygroupingress
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{
- "CIDRIP": "$1",
- "DBSecurityGroupName": "$2",
- "EC2SecurityGroupId": "$3",
- "EC2SecurityGroupName": "$4",
- "EC2SecurityGroupOwnerId": "$5"
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbsubnetgroup
-# key: rds-dbsubnetgroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:rdsDBSubnetGroup}": {
- "Type": "AWS::RDS::DBSubnetGroup",
- "Properties": {
- "DBSubnetGroupDescription": "$2",
- "SubnetIds": [ "$3" ],
- "Tags": [ $4 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-eventsubscription
-# key: rds-eventsubscription
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:rdsEventSubscription}": {
- "Type": "AWS::RDS::EventSubscription",
- "Properties": {
- "Enabled": "${2:$$(yas-choose-value '("true" "false"))}",
- "EventCategories": [ "$3" ],
- "SnsTopicArn": "$4",
- "SourceIds": [ "$5" ],
- "SourceType ": "$6"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-cluster
-# key: redshift-cluster
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:redshiftCluster}": {
- "Type": "AWS::Redshift::Cluster",
- "Properties": {
- "AllowVersionUpgrade": "${2:$$(yas-choose-value '("true" "false"))}",
- "AutomatedSnapshotRetentionPeriod": "$3",
- "AvailabilityZone": "$4",
- "ClusterParameterGroupName": "$5",
- "ClusterSecurityGroups": [ "$6" ],
- "ClusterSubnetGroupName": "$7",
- "ClusterType": "$8",
- "ClusterVersion": "$9",
- "DBName": "$10",
- "ElasticIp": "$11",
- "Encrypted": "${12:$$(yas-choose-value '("true" "false"))}",
- "HsmClientCertificateIdentifier": "$13",
- "HsmConfigurationIdentifier": "$14",
- "MasterUsername": "$15",
- "MasterUserPassword": "$16",
- "NodeType": "$17",
- "NumberOfNodes": "$18",
- "OwnerAccount": "$19",
- "Port": "$20",
- "PreferredMaintenanceWindow": "$21",
- "PubliclyAccessible": "${22:$$(yas-choose-value '("true" "false"))}",
- "SnapshotClusterIdentifier": "$23",
- "SnapshotIdentifier": "$24",
- "VpcSecurityGroupIds": [ "$25" ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-clusterparametergroup
-# key: redshift-clusterparametergroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:redshiftClusterParameterGroup}": {
- "Type": "AWS::Redshift::ClusterParameterGroup",
- "Properties": {
- "Description": "$2",
- "ParameterGroupFamily": "$3",
- "Parameters": [ $4 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-clustersecuritygroup
-# key: redshift-clustersecuritygroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:redshiftClusterSecurityGroup}": {
- "Type": "AWS::Redshift::ClusterSecurityGroup",
- "Properties": {
- "Description": "$2"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-clustersecuritygroupingress
-# key: redshift-clustersecuritygroupingress
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:redshiftClusterSecurityGroupIngress}": {
- "Type": "AWS::Redshift::ClusterSecurityGroupIngress",
- "Properties": {
- "ClusterSecurityGroupName": "$2",
- "CIDRIP": "$3",
- "EC2SecurityGroupName": "$4",
- "EC2SecurityGroupOwnerId": "$5"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-clustersubnetgroup
-# key: redshift-clustersubnetgroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:redshiftClusterSubnetGroup}": {
- "Type": "AWS::Redshift::ClusterSubnetGroup",
- "Properties": {
- "Description": "$2",
- "SubnetIds": [ "$3" ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ref
-# key: ref
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{ "Ref": "${1:logicalName}" }$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-resource
-# key: resource
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:resourceName}": {
- "Description": "${2:-}",
- "Type": "${3:-}",
- "Properties": "${4:-}"
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route
-# key: route
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:routeName}": {
- "Type": "AWS::EC2::Route",
- "Properties": {
- "RouteTableId": ${2:"--"},
- "DestinationCidrBlock": "${3:"--"}",
- "GatewayId": ${4:"--"}
- }
-}$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route-table
-# key: route-table
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:routeTableName}": {
- "Type": "AWS::EC2::RouteTable",
- "Properties": {
- "VpcId": ${2:"--"},
- "Tags": [${3:"--"}]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route-table-assoc
-# key: route-table-assoc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:routeTableAssocName"}: {
- "Type": "AWS::EC2::SubnetRouteTableAssociation",
- "Properties": {
- "SubnetId": ${2:"--"},
- "RouteTableId": ${3:"--"}
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-healthcheck
-# key: route53-healthcheck
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:route53HealthCheck}": {
- "Type": "AWS::Route53::HealthCheck",
- "Properties": {
- "HealthCheckConfig": { $2 },
- "HealthCheckTags": [ $3 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-hostedzone
-# key: route53-hostedzone
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"$1": {
- "Type": "AWS::Route53::HostedZone",
- "Properties": {
- "Name": "$2",
- "VPCs": "$3",
- "HostedZoneConfig": {$4},
- "HostedZoneTags": [$5]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-recordset
-# key: route53-recordset
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:route53RS}": {
- "Type": "AWS::Route53::RecordSet",
- "Properties": {
- "Name": "$2",
- "Type": "${3:$$(yas-choose-value '("A" "AAAA" "CNAME" "MX" "NS" "PTR" "SOA" "SPF" "SRV" "TXT"))}",
- "AliasTarget": {$4},
- "Comment": "$5",
- "Failover": "$6",
- "GeoLocation": {$7},
- "HealthCheckId": "$8",
- "HostedZoneId": "$9",
- "HostedZoneName": "$10",
- "Region": "$11",
- "ResourceRecords": [ "$12" ],
- "SetIdentifier": "$13",
- "TTL": "$14",
- "Weight": "$15"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-recordset-group
-# key: route53-recordset-group
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:route53RSGroup}": {
- "Type": "AWS::Route53::RecordSetGroup",
- "Properties": {
- "HostedZoneId": "$2",
- "HostedZoneName": "$3",
- "RecordSets": [ {$4} ],
- "Comment": "$5"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-s3-bucket
-# key: s3-bucket
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:s3Bucket}": {
- "Type": "AWS::S3::Bucket",
- "Properties": {
- "AccessControl": "${2:$$(yas-choose-value '("true" "false" "Private" "PublicRead" "PublicReadWrite" "AuthenticatedRead" "LogDeliveryWrite" "BucketOwnerRead" "BucketOwnerFullControl"))}",
- "BucketName": "$3",
- "CorsConfiguration": {$4},
- "LifecycleConfiguration": {$5},
- "NotificationConfiguration": {$6},
- "VersioningConfiguration": {$7},
- "WebsiteConfiguration": {$8},
- "Tags": [$9]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-s3-bucketpolicy
-# key: s3-bucketpolicy
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:s3BucketPolicy}": {
- "Type": "AWS::S3::BucketPolicy",
- "Properties": {
- "Bucket" : "$2",
- "PolicyDocument" : {$3}
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-security-group-egress-block
-# key: security-group-egress-block
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"SecurityGroupEgress" : [
- ${1:--insert rules--}
-]$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-security-group
-# key: security-group
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:secGroupName}" : {
- "Type" : "AWS::EC2::SecurityGroup",
- "Properties": {
- "GroupName": "${2:-}",
- "GroupDescription": "${3:-}",
- "SecurityGroupIngress": [
- ${4:--insert rules--}
- ],
- "VpcId": ${5:ref-to-vpc},
- "Tags": [ ${6:insert tag} ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-securitygroup-rule
-# key: sg-rule
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{
-"Description": "$1",
-"IpProtocol": "${2:$$(yas-choose-value '("tcp" "udp" "icmp" "-1"))}",
-"FromPort": $3,
-"ToPort": $4,
-"${5:$$(yas-choose-value '("SourceSecurityGroupId" "DestinationSecurityGroupId" "CidrIp" "CidrIpv6" "DestinationPrefixListId"))}": "$6"
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-select-list
-# key: select-list
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{ "Fn::Select" : [ ${1:$$(yas-choose-value '("0" "1" "etc"))}, {"Ref": "${2:list_name}"} ] }$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sg-egress-cidr
-# key: security-group-egress-cidr
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{ "IpProtocol" : "${1:$$(yas-choose-value '("tcp" "udp" "ip"))}", "FromPort" : "${2:-}", "ToPort" : "${3:-}", "CidrIp" : "${4:-}" }$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sg-ingress-cidr
-# key: security-group-ingress
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{ "IpProtocol" : "${1:$$(yas-choose-value '("tcp" "udp" "ip"))}", "FromPort" : "${2:-}", "ToPort" : "${3:-}", "CidrIp" : "${4:-}" }$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sns-topic
-# key: sns-topic
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:snsTopic}": {
- "Type": "AWS::SNS::Topic",
- "Properties": {
- "DisplayName": "$2",
- "Subscription": [ $3 ],
- "TopicName": "$4"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sns-topicpolicy
-# key: sns-topicpolicy
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:snsTopicPolicy}": {
- "Type": "AWS::SNS::TopicPolicy",
- "Properties":
- {
- "PolicyDocument": {$2},
- "Topics": [ {$3} ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sqs-queue
-# key: sqs-queue
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:sqsQueue}": {
- "Type": "AWS::SQS::Queue",
- "Properties": {
- "DelaySeconds": "$2",
- "MaximumMessageSize": "$3",
- "MessageRetentionPeriod": "$4",
- "QueueName": "$5",
- "ReceiveMessageWaitTimeSeconds": "$6",
- "RedrivePolicy": {$7},
- "VisibilityTimeout": "$8"
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sqs-queuepolicy
-# key: sqs-queuepolicy
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:sqsQueuePolicy}": {
- "Type": "AWS::SQS::QueuePolicy",
- "Properties": {
- "PolicyDocument": {$2},
- "Queues": [ $3 ]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-start
-# key: start
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{
- "AWSTemplateFormatVersion": "2010-09-09",
- "Description": "${1}",
- "Metadata": {
-
- },
- "Parameters": {
-
- },
- "Mappings": {
-
- },
- "Conditions": {
-
- },
- "Resources": {
-
- },
- "Outputs": {
-
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-subnet
-# key: subnet
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:subnetName}": {
- "Type": "AWS::EC2::Subnet",
- "Properties": {
- "AvailabilityZone": ${2:"-"},
- "VpcId": ${3:"-"},
- "CidrBlock": ${4:"-"},
- "Tags": [${5:"-"}]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-tag
-# key: tag
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-{ "Key": "${1:-}", "Value": ${2:"--"} }$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-vpc
-# key: vpc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:name}": {
- "Type": "AWS::EC2::VPC",
- "Properties": {
- "CidrBlock": ${2:"----/--"},
- "Tags": [${3:-}]
- }
-}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-vpn-gateway
-# key: vpn-gateway
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-"${1:vgwName}": {
- "Type": "AWS::EC2::VPNGateway",
- "Properties": {
- "Type": "ipsec.1",
- "Tags": [${2:"--"}]
- }
-},
-"AttachVpnGateway": {
- "Type": "AWS::EC2::VPCGatewayAttachment",
- "Properties": {
- "VpcId": ${3:"--"},
- "VpnGatewayId": { "Ref": "$1" }
- }
-}$0
+++ /dev/null
-shell-mode
-eshell-mode
+++ /dev/null
-eshell-mode
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-group
-# key: autoscaling-group
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:-}:
- Type: AWS::AutoScaling::AutoScalingGroup
- Properties:
- AvailabilityZones: ${2:"--"}
- LaunchConfigurationName: ${3:"--"},
- MaxSize: ${4:--}
- MinSize: ${5:--}
- Tags:
- - Key: Name
- Value: ${6:"--"}
- PropagateAtLaunch: True
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-autoscaling-group-vpc
-# key: autoscaling-group-vpc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:-}:
- Type: AWS::AutoScaling::AutoScalingGroup
- Properties:
- AvailabilityZones: ${2:azs}
- LaunchConfigurationName: ${3:"-"}
- MaxSize: ${4:-}
- MinSize: ${5:-}
- VPCZoneIdentifier:
- - ${6:list of subnet ids}
- Tags:
- - Key: "${7:Name}"
- Value: "${8:-}"
- PropagateAtLaunch: "True"
-
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-availability-zone
-# key: availability-zone
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-!Join: ["",[ Ref: AWS::Region,"${1:a}" ] ]$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-authentication
-# key: cloudformation-authentication
-# group: cloudformation
-# --
-AWS::CloudFormation::Authentication:
- ${1:AccessCreds}:
- type: "$2"
- buckets: "$3"
- roleName: "$4"
- accessKeyId: "$5"
- secretKey: "$6"
- uris: [ "$7" ]
- username: "$8"
- password: "$9"
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-customresource
-# key: cloudformation-customresource
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:customResource}:
- Type: AWS::CloudFormation::CustomResource
- Version: "1.0",
- Properties:
- ServiceToken: "$2"
- $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-init
-# key: cloudformation-init
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-AWS::CloudFormation::Init:
- config:
- packages:
- $0
- groups:
- users:
- sources:
- files:
- commands:
- services:
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-stack
-# key: cloudformation-stack
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:cloudFormationStack}:
- Type: AWS::CloudFormation::Stack
- Properties:
- NotificationARNs:
- - $2
- Parameters:
- - $3
- TemplateURL: $4
- TimeoutInMinutes: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-waitcondition
-# key: cloudformation-waitcondition
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:waitCondition}:
- Type: AWS::CloudFormation::WaitCondition
- Properties:
- Count: $2
- Handle: $3
- Timeout: $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudformation-waitconditionhandle
-# key: cloudformation-waitconditionhandle
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:waitConditionHandle}:
- Type: AWS::CloudFormation::WaitConditionHandle
- Properties: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudfront-distribution
-# key: cloudfront-distribution
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:cloudfrontDistribution}:
- Type: AWS::CloudFront::Distribution
- Properties:
- DistributionConfig: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudtrail
-# key: cloudtrail
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:cloudTrail}:
- Type: AWS::CloudTrail::Trail
- Properties:
- S3BucketName: $2
- IncludeGlobalServiceEvents: ${3:$$(yas-choose-value '("true" "false")}
- IsLogging: ${4:$$(yas-choose-value '("true" "false"))}
- S3KeyPrefix: $5
- SnsTopicName: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-cloudwatch-alarm
-# key: cloudwatch-alarm
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:cloudWatchAlarm}:
- Type: AWS::CloudWatch::Alarm
- Properties:
- MetricName: $2
- Namespace: $3
- ComparisonOperator: $4
- EvaluationPeriods: $5
- Period: $6
- Statistic: $7
- Threshold: $8
- ActionsEnabled: ${9:$$(yas-choose-value '("true" "false"))}
- AlarmActions:
- - $10
- AlarmDescription: $11
- AlarmName: $12
- Dimensions:
- - $13
- InsufficientDataActions:
- - $14
- OKActions:
- - $15
- Unit: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-dynamodb-table
-# key: dynamodb-table
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:dynamodbTable}:
- Type: AWS::DynamoDB::Table
- Properties:
- AttributeDefinitions:
- - $2
- GlobalSecondaryIndexes:
- - $3
- KeySchema:
- - $4
- LocalSecondaryIndexes:
- - $5
- ProvisionedThroughput: $6
- TableName: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-instance
-# key: ec2-instance
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:-}:
- Type: AWS::EC2::Instance
- Properties:
- KeyName: ${2:-},
- DisableApiTermination: ${3:$$(yas-choose-value '("true" "false"))}
- ImageId: { ${4:-} }
- InstanceType: ${5:-}
- Monitoring: ${6:$$(yas-choose-value '("true" "false"))}
- SecurityGroupIds:
- - ${7:-}
- Tags:
- - Key: ${8:-}
- Value: ${9:-}
- UserData:
- Fn::Base64:
- !Join:
- - ""
- - "#!/bin/bash -ex"
- - "${10:-}"
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ec2-volume
-# key: ec2-volume
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:ec2Volume}:
- Type: AWS::EC2::Volume
- Properties:
- AutoEnableIO: ${2:$$(yas-choose-value '("true" "false"))}
- AvailabilityZone: ${3:-}
- Encrypted: ${4:$$(yas-choose-value '("true" "false"))}
- KmsKeyId: "${5:-}",
- Size: "${6:-}",
- SnapshotId: ${7:snap-}
- Tags:
- - Key: ${8:-}
- Value: ${9:-}
- VolumeType: ${10:$$(yas-choose-value '("standard" "io1" "gp2"))}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-eip-vpc
-# key: eip-vpc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:eipName}:
- Type: AWS::EC2::EIP
- Properties:
- Domain: "vpc",
- InstanceId: ${2:"--"}
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elastic-load-balancer
-# key: elastic-load-balancer
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:-}:
- Type: AWS::ElasticLoadBalancing::LoadBalancer
- Properties:
- AvailabilityZones:
- - ${2:-}
- Listeners:
- - ${3:-}
- Tags":
- tag$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elastic-load-balancer-vpc
-# key: elastic-load-balancer-vpc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:-}:
- Type: AWS::ElasticLoadBalancing::LoadBalancer
- Properties:
- Listeners:
- - ${2:-}
- SecurityGroups:
- ${3:-}
- Subnets:
- - ${4:-}
- Tags:
- tag$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elastic-load-balancer-vpc-internal
-# key: elastic-load-balancer-vpc-internal
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:-}:
- Type: AWS::ElasticLoadBalancing::LoadBalancer
- Properties:
- Listeners:
- - ${2:-}
- Scheme: "internal"
- SecurityGroups:
- - ${3:-}
- Subnets:
- - ${4:-}
- Tags:
- tag$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-cachecluster
-# key: elasticche-cachecluster
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:elasticacheCacheCluster}:
- Type: AWS::ElastiCache::CacheCluster
- Properties:
- AutoMinorVersionUpgrade: ${2:$$(yas-choose-value '("true" "false"))}
- AZMode: $3
- CacheNodeType: $4
- CacheParameterGroupName: $5
- CacheSecurityGroupNames:
- - $6
- CacheSubnetGroupName: $7
- ClusterName: $8
- Engine: $9
- EngineVersion: $10
- NotificationTopicArn: $11
- NumCacheNodes: $12
- Port: $13
- PreferredAvailabilityZone: $14
- PreferredAvailabilityZones:
- - $15
- PreferredMaintenanceWindow: $16
- SnapshotArns:
- - $17
- SnapshotRetentionLimit: $18
- SnapshotWindow: $19
- VpcSecurityGroupIds:
- - $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-parametergroup
-# key: elasticache-parametergroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:elasticacheParameterGroup}:
- Type: AWS::ElastiCache::ParameterGroup
- Properties:
- CacheParameterGroupFamily: $2
- Description: $3
- Properties:
- $4: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-securitygroup
-# key: elasticache-securitygroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:elasticacheSecurityGroup}:
- Type: AWS::ElastiCache::SecurityGroup
- Properties:
- Description: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-securitygroupingress
-# key: elasticache-securitygroupingress
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:elasticacheSecurityGroupIngress}:
- Type: AWS::ElastiCache::SecurityGroupIngress
- Properties:
- CacheSecurityGroupName: $2
- EC2SecurityGroupName: $3
- EC2SecurityGroupOwnerId: $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticache-subnetgroup
-# key: elasticache-subnetgroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:elasticacheSubnetGroup}:
- Type: AWS::ElastiCache::SubnetGroup
- Properties:
- Description: $2
- SubnetIds:
- - $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticbeanstalk-application
-# key: elasticbeanstalk-application
-# group: cloudformation
-# --
-${1:elasticbeanstalkApplication}:
- Type: AWS::ElasticBeanstalk::Application
- Properties:
- ApplicationName: $2
- Description: $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticbeanstalk-applicationversion
-# key: elasticbeanstalk-applicationversion
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:elasticbeanstalkApplicationVersion}:
- Type: AWS::ElasticBeanstalk::ApplicationVersion
- Properties:
- ApplicationName: $2
- Description: $3
- SourceBundle:
- $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticbeanstalk-configurationtemplate
-# key: elasticbeanstalk-configurationtemplate
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:elasticbeanstalkConfigurationTemplate}:
- Type: AWS::ElasticBeanstalk::ConfigurationTemplate
- Properties:
- ApplicationName: $2
- Description: $3
- EnvironmentId: $4
- OptionSettings:
- - $5
- SolutionStackName: $6
- SourceConfiguration: $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elasticbeanstalk-environment
-# key: elasticbeanstalk-environment
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:elasticbeanstalkEnvironment}:
- Type: AWS::ElasticBeanstalk::Environment
- Properties:
- ApplicationName: $2
- CNAMEPrefix: $3
- Description: $4
- EnvironmentName: $5
- OptionSettings:
- - $6
- SolutionStackName: $7
- TemplateName: $8
- Tier: $9
- VersionLabel: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-elb-listener
-# key: elb-listener
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-InstancePort: ${1:-}
-InstanceProtocol: ${2:$$(yas-choose-value '("HTTP" "HTTPS" "TCP" "SSL"))}
-LoadBalancerPort: ${3:$1}
-Protocol: ${4:$$(yas-choose-value '("HTTP" "HTTPS" "TCP" "SSL"))}
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-find-in-map
-# key: find-in-map
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-!FindInMap
- - ${1:map}
- - ${2:selector}
- - ${3:value}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-get-attr
-# key: get-attr
-# group: cloudformation
-# --
-!GetAtt [ ${1:logicalNameOfResource}, ${2:attributeName} ]$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-accesskey
-# key: iam-accesskey
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:iamAccessKey}:
- Type: AWS::IAM::AccessKey
- Properties:
- Status: $2
- UserName: $3
- Serial: $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-group
-# key: iam-group
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:iamGroup}:
- Type: AWS::IAM::Group
- Properties:
- Path: $2
- Policies:
- - $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-instanceprofile
-# key: iam-instanceprofile
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:iamInstanceProfile}:
- Type: AWS::IAM::InstanceProfile
- Properties:
- Path: ${2:/}
- Roles:
- - $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-policy
-# key: iam-policy
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:iamPolicy}:
- Type: AWS::IAM::Policy
- Properties:
- Groups:
- - $2
- PolicyDocument: {$3}
- PolicyName: $4
- Roles:
- - $5
- Users:
- - $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-role
-# key: iam-role
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:iamRole}:
- Type: AWS::IAM::Role
- Properties:
- AssumeRolePolicyDocument": $2
- Path: $3
- Policies:
- - $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-user
-# key: iam-user
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:iamUser}:
- Type: AWS::IAM::User
- Properties:
- Path: ${2:/}
- Groups:
- - $3
- LoginProfile:
- Password: "$4"
- Policies:
- - $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-iam-usertogroupaddition
-# key: iam-usertogroupaddition
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:iamUserToGroupAddition}:
- Type: AWS::IAM::UserToGroupAddition
- Properties:
- GroupName: $2
- Users:
- - $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-internet-gateway
-# key: internet-gateway
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:igwName}:
- Type: AWS::EC2::InternetGateway
- Properties:
- Tags:
- tag$0
-AttachGateway:
- Type: AWS::EC2::VPCGatewayAttachment
- Properties:
- VpcId: ${3:"--"}
- InternetGatewayId: { "Ref": "$1" }
-
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-join
-# key: join
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-!Join [ "$1",[ ${2:"prefix"}, ${3:"suffix"} ] ]$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-kinesis-stream
-# key: kinesis-stream
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:kinesisStream}:
- Type: AWS::Kinesis::Stream
- Properties:
- ShardCount: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-launch-config
-# key: launch-config
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:launchConfigName}:
- Type: AWS::AutoScaling::LaunchConfiguration
- Properties:
- IamInstanceProfile: ${2:"--"}
- ImageId: ${3:"--"}
- InstanceMonitoring: ${4:"--"}
- InstanceType: ${5:--}
- KeyName: ${6:"--"}
- SecurityGroups:
- - $0
- UserData:
- Fn::Base64:
- !Join:
- - ""
- - "#!/bin/bash -ex"
- - "${7:-}"
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-logs-loggroup
-# key: logs-loggroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:logLogGroup}:
- Type: AWS::Logs::LogGroup
- Properties:
- RetentionInDays: "${2:7}"
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-logs-metricfilter
-# key: logs-metricfilter
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:logsMetricFilter}:
- Type: AWS::Logs::MetricFilter
- Properties:
- FilterPattern: "[ $2 ]"
- LogGroupName: $3,
- MetricTransformations:
- -
- $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-map
-# key: map
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:mapName}:
- ${2:selector}:
- ${3:key}: ${4:val}
- ${5:selector}:
- ${6:key}: ${7:val}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-map-item
-# key: map-item
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:selector}:
- ${2:key}: ${3:val}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-app
-# key: opsworks-app
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:opsworksApp}:
- Type: AWS::OpsWorks::App
- Properties:
- Name: $2
- StackId: $3
- Type: $4
- AppSource:
- $5
- Attributes:
- $6:$7
- Description: $8
- Domains:
- - $9
- EnableSsl: ${10:$$(yas-choose-value '("true" "false"))}
- Shortname: $11
- SslConfiguration:
- $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-elasticloadbalancerattachment
-# key: opsworks-elasticloadbalancerattachment
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:opsworksElasticLoadBalancerAttachment}:
- Type: AWS::OpsWorks::ElasticLoadBalancerAttachment
- Properties:
- ElasticLoadBalancerName: $2
- LayerId: $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-instance
-# key: opsworks-instance
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:opsworksInstance}:
- Type: AWS::OpsWorks::Instance
- Properties:
- InstanceType: $2
- LayerIds:
- - $3
- StackId: $4
- AmiId: $5
- Architecture: $6
- AutoScalingType: $7
- AvailabilityZone: $8
- InstallUpdatesOnBoot: ${9:$$(yas-choose-value '("true" "false"))}
- Os: $10
- RootDeviceType: $11
- SshKeyName: $12
- SubnetId: $13
- TimeBasedAutoScaling:
- $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-layer
-# key: opsworks-layer
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:opsworksLayer}:
- Type: AWS::OpsWorks::Layer
- Properties:
- AutoAssignElasticIps: ${2:$$(yas-choose-value '("true" "false"))}
- AutoAssignPublicIps: ${3:$$(yas-choose-value '("true" "false"))}
- EnableAutoHealing: ${4:$$(yas-choose-value '("true" "false"))}
- Name: $5
- Shortname: $6
- StackId: $7
- Type: $8
- Attributes:
- $9:$10
- CustomInstanceProfileArn: $11
- CustomRecipes: $12
- CustomSecurityGroupIds:
- - $13
- InstallUpdatesOnBoot: ${14:$$(yas-choose-value '("true" "false"))}
- LoadBasedAutoScaling:
- $15
- Packages:
- - $16
- VolumeConfigurations:
- - $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-opsworks-stack
-# key: opsworks-stack
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:opsworksStack}:
- Type: AWS::OpsWorks::Stack
- Properties:
- DefaultInstanceProfileArn: $2
- Name: $3
- ServiceRoleArn: $4
- Attributes:
- $5:$6
- ChefConfiguration:
- $7
- ConfigurationManager:
- $8
- CustomCookbooksSource:
- $9
- CustomJson:
- $10
- DefaultAvailabilityZone: $11
- DefaultOs: $12
- DefaultRootDeviceType: $13
- DefaultSshKeyName: $14
- DefaultSubnetId: $15
- HostnameTheme: $16
- UseCustomCookbooks: ${17:$$(yas-choose-value '("true" "false"))}
- UseOpsworksSecurityGroup": ${18:$$(yas-choose-value '("true" "false"))}
- VpcId: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-output
-# key: output
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:name}:
- Value: ${2:Value to return}
- Description: ${3:Information about the value}
- Export:
- Name: ${4:Value to export}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-parameter
-# key: parameter
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:paramName}:
- Description: ${2:-}
- Type: ${3:$$(yas-choose-value '("String" "Number" "CommaDelimitedList"))}
- Default: ${4:-}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbinstance
-# key: rds-dbinstance
-# group: cloudformation
-# --
-${1:rdsDBInstance}:
- Type: AWS::RDS::DBInstance
- Properties:
- AllocatedStorage: ${2}
- DBInstanceClass: ${3}
- AllowMajorVersionUpgrade: ${4:$$(yas-choose-value '("true" "false"))}
- AutoMinorVersionUpgrade: ${5:$$(yas-choose-value '("true" "false"))}
- AvailabilityZone: $6
- BackupRetentionPeriod: $7
- CharacterSetName: $8
- DBInstanceIdentifier: $9
- DBName: $10
- DBParameterGroupName: $11
- DBSecurityGroups:
- - $12
- DBSnapshotIdentifier: $13
- DBSubnetGroupName: $14
- Engine: $15
- EngineVersion: $16
- Iops: $17
- KmsKeyId: $18
- LicenseModel: $19
- MasterUsername: $20
- MasterUserPassword: $21
- MultiAZ: ${22:$$(yas-choose-value '("true" "false"))}
- OptionGroupName: $23
- Port: $24
- PreferredBackupWindow: $25
- PreferredMaintenanceWindow: $26
- PubliclyAccessible: ${27:$$(yas-choose-value '("true" "false"))}
- SourceDBInstanceIdentifier: $28
- StorageEncrypted: ${29:$$(yas-choose-value '("true" "false"))}
- StorageType: $30
- Tags:
- tag$0
- VPCSecurityGroups:
- $32
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbparametergroup
-# key: rds-dbparametergroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:rdsDBParameterGroup}:
- Type: AWS::RDS::DBParameterGroup
- Properties:
- Description: $2
- Family: $3
- Parameters:
- - $4
- Tags:
- tag$0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbsecuritygroup
-# key: rds-dbsecuritygroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:rdsDBSecurityGroup}:
- Type: AWS::RDS::DBSecurityGroup
- Properties:
- EC2VpcId: $2
- DBSecurityGroupIngress:
- $3
- GroupDescription: $4
- Tags:
- tag$0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbsecuritygroupingress
-# key: rds-dbsecuritygroupingress
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-CIDRIP: $1
-DBSecurityGroupName: $2
-EC2SecurityGroupId: $3
-EC2SecurityGroupName: $4
-EC2SecurityGroupOwnerId: $5
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-dbsubnetgroup
-# key: rds-dbsubnetgroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:rdsDBSubnetGroup}:
- Type: AWS::RDS::DBSubnetGroup
- Properties:
- DBSubnetGroupDescription: $2
- SubnetIds:
- $3
- Tags:
- tag$0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-rds-eventsubscription
-# key: rds-eventsubscription
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:rdsEventSubscription}:
- Type: AWS::RDS::EventSubscription
- Properties:
- Enabled: ${2:$$(yas-choose-value '("true" "false"))}
- EventCategories:
- - $3
- SnsTopicArn: $4
- SourceIds:
- - $5
- SourceType: $6
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-cluster
-# key: redshift-cluster
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:redshiftCluster}:
- Type: AWS::Redshift::Cluster
- Properties:
- AllowVersionUpgrade: ${2:$$(yas-choose-value '("true" "false"))}
- AutomatedSnapshotRetentionPeriod: $3
- AvailabilityZone: $4
- ClusterParameterGroupName: $5
- ClusterSecurityGroups:
- $6
- ClusterSubnetGroupName: $7
- ClusterType: $8
- ClusterVersion: $9
- DBName: $10
- ElasticIp: $11
- Encrypted: ${12:$$(yas-choose-value '("true" "false"))}
- HsmClientCertificateIdentifier: $13
- HsmConfigurationIdentifier: $14
- MasterUsername: $15
- MasterUserPassword: $16
- NodeType: $17
- NumberOfNodes: $18
- OwnerAccount: $19
- Port: $20
- PreferredMaintenanceWindow: $21
- PubliclyAccessible: ${22:$$(yas-choose-value '("true" "false"))}
- SnapshotClusterIdentifier: $23
- SnapshotIdentifier: $24
- VpcSecurityGroupIds:
- $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-clusterparametergroup
-# key: redshift-clusterparametergroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:redshiftClusterParameterGroup}:
- Type: AWS::Redshift::ClusterParameterGroup
- Properties:
- Description: $2
- ParameterGroupFamily: $3
- Parameters:
- $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-clustersecuritygroup
-# key: redshift-clustersecuritygroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:redshiftClusterSecurityGroup}:
- Type: AWS::Redshift::ClusterSecurityGroup
- Properties:
- Description": $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-clustersecuritygroupingress
-# key: redshift-clustersecuritygroupingress
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:redshiftClusterSecurityGroupIngress}:
- Type: AWS::Redshift::ClusterSecurityGroupIngress
- Properties:
- ClusterSecurityGroupName: $2
- CIDRIP: $3
- EC2SecurityGroupName: $4
- EC2SecurityGroupOwnerId: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-redshift-clustersubnetgroup
-# key: redshift-clustersubnetgroup
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:redshiftClusterSubnetGroup}:
- Type: "AWS::Redshift::ClusterSubnetGroup",
- Properties:
- Description: $2
- SubnetIds:
- $3
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-ref
-# key: ref
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-!Ref: ${1:logicalName}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-resource
-# key: resource
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:resourceName}:
- Description: ${2:-}
- Type: ${3:-}
- Properties: ${4:-}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route
-# key: route
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:routeName}:
- Type: AWS::EC2::Route
- Properties:
- RouteTableId: ${2:"--"}
- DesinationCidrBlock: ${3:"--"}
- GatewayId: ${4:"--"}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route-table
-# key: route-table
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:routeTableName}:
- Type: AWS::EC2::RouteTable
- Properties:
- VpcId: ${2:"--"}
- Tags:
- - ${3:"--"}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route-table-assoc
-# key: route-table-assoc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:routeTableAssocName"}:
- Type: AWS::EC2::SubnetRouteTableAssociation
- Properties:
- SubnetId: ${2:"--"},
- RouteTableId: ${3:"--"}
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-healthcheck
-# key: route53-healthcheck
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:route53HealthCheck}:
- Type: AWS::Route53::HealthCheck
- Properties:
- HealthCheckConfig: $2
- HealthCheckTags: $3
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-hostedzone
-# key: route53-hostedzone
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-$1:
- Type: AWS::Route53::HostedZone
- Properties:
- Name: $2
- VPCs: $3
- HostedZoneConfig: $4
- HostedZoneTags:
- - $5
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-recordset
-# key: route53-recordset
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:route53RS}:
- Type: AWS::Route53::RecordSet
- Properties:
- Name: $2
- Type: ${3:$$(yas-choose-value '("A" "AAAA" "CNAME" "MX" "NS" "PTR" "SOA" "SPF" "SRV" "TXT"))}
- AliasTarget: $4
- Comment: $5
- Failover: $6
- GeoLocation: $7
- HealthCheckId: $8
- HostedZoneId: $9
- HostedZoneName: $10
- Region: $11
- ResourceRecords:
- - $12
- SetIdentifier: $13
- TTL: $14
- Weight: $15
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-route53-recordset-group
-# key: route53-recordset-group
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:route53RSGroup}:
- Type: AWS::Route53::RecordSetGroup
- Properties:
- HostedZoneId: $2
- HostedZoneName: $3
- RecordSets:
- - {$4}
- Comment: $5
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-s3-bucket
-# key: s3-bucket
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:s3Bucket}:
- Type: AWS::S3::Bucket
- Properties:
- AccessControl: ${2:$$(yas-choose-value '("true" "false" "Private" "PublicRead" "PublicReadWrite" "AuthenticatedRead" "LogDeliveryWrite" "BucketOwnerRead" "BucketOwnerFullControl"))}
- BucketName: $3
- CorsConfiguration: $4
- LifecycleConfiguration: $5
- NotificationConfiguration: $6
- VersioningConfiguration: $7
- WebsiteConfiguration: $8
- Tags:
- tag$0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-s3-bucketpolicy
-# key: s3-bucketpolicy
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:s3BucketPolicy}:
- Type: AWS::S3::BucketPolicy
- Properties:
- Bucket : $2
- PolicyDocument:
- - $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-security-group
-# key: security-group
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:secGroupName}:
- Type: AWS::EC2::SecurityGroup
- Properties:
- GroupName: ${2:-}
- GroupDescription: ${3:-}
- SecurityGroupIngress:
- - ${4:--insert rules--}
- VpcId: ${5:ref-to-vpc}
- Tags:
- $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-securitygroup-rule
-# key: sg-rule
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-Description: "$1"
-IpProtocol: "${2:$$(yas-choose-value '("tcp" "udp" "icmp" "-1"))}"
-FromPort: $3
-ToPort: $4
-${5:$$(yas-choose-value '("SourceSecurityGroupId" "DestinationSecurityGroupId" "CidrIp" "CidrIpv6" "DestinationPrefixListId"))}: "$6"$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-select-list
-# key: select-list
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-!Select: [ ${1:$$(yas-choose-value '("0" "1" "etc"))}, {"Ref": "${2:list_name}"} ] }$0
\ No newline at end of file
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sg-egress-cidr
-# key: security-group-egress-cidr
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-IpProtocol: ${1:$$(yas-choose-value '("tcp" "udp" "ip"))}
-FromPort: ${2:-}
-ToPort: ${3:-}
-CidrIp: ${4:-}
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sg-ingress-cidr
-# key: security-group-ingress
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-IpProtocol: ${1:$$(yas-choose-value '("tcp" "udp" "ip"))}
-FromPort: ${2:-}
-ToPort: ${3:-}
-CidrIp: ${4:-}
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sns-topic
-# key: sns-topic
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:snsTopic}:
- Type: AWS::SNS::Topic
- Properties:
- DisplayName: $2
- Subscription:
- $3
- TopicName: $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sns-topicpolicy
-# key: sns-topicpolicy
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:snsTopicPolicy}:
- Type: AWS::SNS::TopicPolicy
- Properties:
- PolicyDocument: $2
- Topics: $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sqs-queue
-# key: sqs-queue
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:sqsQueue}:
- Type: AWS::SQS::Queue
- Properties:
- DelaySeconds: $2
- MaximumMessageSize: $3
- MessageRetentionPeriod: $4
- QueueName: $5
- ReceiveMessageWaitTimeSeconds: $6
- RedrivePolicy:
- - $7
- VisibilityTimeout: $0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-sqs-queuepolicy
-# key: sqs-queuepolicy
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:sqsQueuePolicy}:
- Type: AWS::SQS::QueuePolicy
- Properties:
- PolicyDocument:
- - $2
- Queues:
- $0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-start
-# key: start
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-AWSTemplateFormatVersion: "2010-09-09"
-Description: ${1}
-
-Metadata:
-
-Parameters:
-
-Mappings:
-
-Conditions:
-
-Resources:
-
-Outputs:
-$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-subnet
-# key: subnet
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:subnetName}:
- Type: AWS::EC2::Subnet
- Properties:
- AvailabilityZone: ${2:"-"}
- VpcId: ${3:"-"}
- CidrBlock: ${4:"-"}
- Tags:
- tag$0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-tag
-# key: tag
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
--
- Key: ${1:-}
- Value: ${2:"--"}$0
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-vpc
-# key: vpc
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:name}:
- Type: AWS::EC2::VPC
- Properties:
- CidrBlock: ${2:"----/--"}
- Tags:
- tag$0
-
+++ /dev/null
-# -*- mode: snippet -*-
-# name: aws-vpn-gateway
-# key: vpn-gateway
-# group: cloudformation
-# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
-# --
-${1:vgwName}:
- Type: AWS::EC2::VPNGateway
- Properties:
- Type: ipsec.1
- Tags:
-${2:AttachVpnGateway}:
- Type: AWS::EC2::VPCGatewayAttachment
- Properties:
- VpcId: ${3:"--"}
- VpnGatewayId:
- Ref: $1
-$0
--- /dev/null
+;;; aws-snippets-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+
+(add-to-list 'load-path (directory-file-name
+ (or (file-name-directory #$) (car load-path))))
+
+\f
+;;;### (autoloads nil "aws-snippets" "aws-snippets.el" (0 0 0 0))
+;;; Generated autoloads from aws-snippets.el
+
+(autoload 'aws-snippets-initialize "aws-snippets" "\
+Initialize package.
+
+\(fn)" nil nil)
+
+(eval-after-load 'yasnippet '(aws-snippets-initialize))
+
+(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "aws-snippets" '("aws-snippets-")))
+
+;;;***
+\f
+;;;### (autoloads nil nil ("aws-snippets-pkg.el") (0 0 0 0))
+
+;;;***
+\f
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; aws-snippets-autoloads.el ends here
--- /dev/null
+(define-package "aws-snippets" "20191203.1553" "Yasnippets for AWS"
+ '((yasnippet "0.8.0"))
+ :keywords
+ '("snippets"))
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
--- /dev/null
+;;; aws-snippets.el --- Yasnippets for AWS
+
+;; Copyright (C) 2018, 2019 Andreas Gerler
+;; keywords: snippets
+;; Version: 0.1.0
+;; Package-Requires: ((yasnippet "0.8.0"))
+
+;; Permission is hereby granted, free of charge, to any person obtaining
+;; a copy of this software and associated documentation files (the
+;; "Software"), to deal in the Software without restriction, including
+;; without limitation the rights to use, copy, modify, merge, publish,
+;; distribute, sublicense, and/or sell copies of the Software, and to
+;; permit persons to whom the Software is furnished to do so, subject to
+;; the following conditions:
+
+;; The above copyright notice and this permission notice shall be
+;; included in all copies or substantial portions of the Software.
+
+;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+;;; Commentary:
+
+;; A collection of yasnippet snippets to be used with AWS CLI as well as JSON for CloudFormation
+
+;;; Code:
+
+(defvar aws-snippets-dir (file-name-directory (or load-file-name
+ (buffer-file-name))))
+
+(defcustom aws-snippets-regions '("us-east-1" "eu-west-1" "ap-southeast-1")
+ "List of AWS regions for selections."
+ :tag "regions"
+ :type '(choice (string :tag "Region")
+ (repeat :tag "List of Regions"
+ (string :tag "Region")))
+ :set #'(lambda (symbol new)
+ (let ((old (and (boundp symbol)
+ (symbol-value symbol))))
+ (set-default symbol new)
+ ))
+ :group 'aws-snippets)
+
+(defcustom aws-snippets-profiles '("test" "prod")
+ "List of AWS profiles for selections."
+ :tag "profiles"
+ :type '(choice (string :tag "Profile")
+ (repeat :tag "List of Profiles"
+ (string :tag "Profiles")))
+ :set #'(lambda (symbol new)
+ (let ((old (and (boundp symbol)
+ (symbol-value symbol))))
+ (set-default symbol new)
+ ))
+ :group 'aws-snippets)
+
+(defcustom aws-snippets-filters '("tag:Name" "tag:Project" "tag:Type" "tag:Cluster" "instance.group-id" "ip-address" "private-ip-address" "network-interface.subnet-id" "description" "name" "iam-instance-profile.arn")
+ "List of AWS filters for selections."
+ :tag "default-filters"
+ :type '(choice (string :tag "Filter")
+ (repeat :tag "List of Filters"
+ (string :tag "Filter")))
+ :set #'(lambda (symbol new)
+ (let ((old (and (boundp symbol)
+ (symbol-value symbol))))
+ (set-default symbol new)
+ ))
+ :group 'aws-snippets)
+
+(defcustom aws-snippets-ami-ls-query '"reverse(sort_by(Images, &CreationDate)[].{CreationDate:CreationDate,Name:Name,ImageId:ImageId,Public:Public,Description:Description})"
+ "Query string used for ami-ls."
+ :tag "ami-ls-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-autoscaling-describe-auto-scaling-groups-query '"AutoScalingGroups[].{Name: AutoScalingGroupName, Desired: DesiredCapacity,Min: MinSize, Max: MaxSize}"
+ "Query string used for autoscaling-describe-auto-scaling-groups."
+ :tag "autoscaling-describe-auto-scaling-groups"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-autoscaling-describe-launch-configurations-query '"reverse(sort_by(LaunchConfigurations &CreatedTime)[*].[LaunchConfigurationName, CreatedTime])"
+ "Query string used for autoscaling-describe-launch-configurations."
+ :tag "autoscaling-describe-launch-configurations-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-dns-names-query '"Reservations[].Instances[?State.Name=='running'].[InstanceId, PublicDnsName]"
+ "Query string used for aws-ec2-get-dns-names."
+ :tag "ec2-get-dns-names-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-instance-volumes-query '"Reservations[].Instances[].[join(\`,\`,Tags[?Key==\`Name\`].Value),join(' ', BlockDeviceMappings[].Ebs.VolumeId)]"
+ "Query string used for ec2-get-instance-volumes."
+ :tag "ec2-get-instance-volumes-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-securitygroups-query '"sort_by(SecurityGroups, &GroupName)[*].[GroupName, GroupId, Description]"
+ "Query string used for ec2-get-securitygroups."
+ :tag "ec2-get-securitygroups-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-snapshots-query '"Snapshots[].[join(\`,\`,Tags[?Key==\`Name\`].Value),StartTime,Description,SnapshotId,VolumeId,VolumeSize,Progress]"
+ "Query string used for ec2-get-snapshots-query."
+ :tag "ec2-get-snapshots-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-volumes-query '"Volumes[].[VolumeId,State,SnapshotId,join(\`,\`,Tags[?Key==\`Name\`].Value)]"
+ "Query string used for ec2-get-volumes-query."
+ :tag "ec2-get-volumes-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-get-volumes-unused-query '"Volumes[].[VolumeId,Size,VolumeType,CreateTime,State,SnapshotId]"
+ "Query string used for ec2-get-volumes-unused-query."
+ :tag "ec2-get-volumes-unused-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-instance-running-query '"Reservations[].Instances[].[InstanceId, State.Name]"
+ "Query string used for ec2-instance-running."
+ :tag "ec2-instance-running-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-list-instances-query '("Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime]"
+ "Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime, IamInstanceProfile.Arn]"
+ "Reservations[].Instances[].[Tags[?Key==`Name`].Value[] | [0],Tags[?Key==`Schedule`].Value[] | [0],InstanceId, State.Name, PublicDnsName, InstanceType,Placement.AvailabilityZone,LaunchTime, KeyName]")
+ "Query string used for ec2 describe-instances."
+ :tag "ec2-list-instances-query"
+ :type '(choice (string :tag "Query")
+ (repeat :tag "List of Queries"
+ (string :tag "Query")))
+ :set #'(lambda (symbol new)
+ (let ((old (and (boundp symbol)
+ (symbol-value symbol))))
+ (set-default symbol new)
+ ))
+ :group 'aws-snippets)
+
+(defcustom aws-snippets-ec2-list-subnets-query '"sort_by(sort_by(Subnets[].{VpcId:VpcId, SubnetId:SubnetId, State:State, AvailabilityZone:AvailabilityZone, CidrBlock:CidrBlock, AvailableIpAddressCount:AvailableIpAddressCount Tags:to_string(Tags[].[Key, Value])}, &SubnetId), &VpcId)"
+ "Query string used for ec2-list-subnets."
+ :tag "ec2-list-subnets-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-ec2-list-vpcs-query '"sort_by(Vpcs[].{VpcId:VpcId, State:State, AvailabilityZone:AvailabilityZone, CidrBlock:CidrBlock, AvailableIpAddressCount:AvailableIpAddressCount Tags:to_string(Tags[].[Key, Value])}, &VpcId)"
+ "Query string used for ec2-list-vpcs."
+ :tag "ec2-list-vpcs-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-elb-get-list-query '"reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName, CreatedTime])"
+ "Query string used for elb-get-list."
+ :tag "elb-get-list-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-emr-list-clusters-query '"Clusters[*].{ID: Id, NAME: Name}"
+ "Query string used for emr-list-clusters."
+ :tag "emr-list-clusters-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-rds-describe-instances-query '"DBInstances[*].[DBInstanceIdentifier,DbiResourceId, Endpoint.Address]"
+ "Query string used for rds describe-db-instances."
+ :tag "rds-describe-db-instances-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-route53-list-hosted-zones-query '"HostedZones[].[Id, Name]"
+ "Query string used for route53 list-hosted-zones."
+ :tag "route53-list-hosted-zones-query"
+ :group 'aws-snippets
+ :type 'string)
+
+(defcustom aws-snippets-aws-support-ls-query '"reverse(sort_by(cases, &timeCreated)[].[caseId, subject, timeCreated, displayId])"
+ "Query string used for aws support-ls-query."
+ :tag "aws-support-ls-query"
+ :group 'aws-snippets
+ :type 'string)
+
+;;;###autoload
+(defun aws-snippets-initialize ()
+ "Initialize package."
+ (let ((snip-dir (expand-file-name "snippets" aws-snippets-dir)))
+ (when (boundp 'yas-snippet-dirs)(add-to-list 'yas-snippet-dirs snip-dir t))
+ (yas-load-directory snip-dir)))
+
+;;;###autoload
+(eval-after-load 'yasnippet
+ '(aws-snippets-initialize))
+
+(require 'yasnippet)
+
+(provide 'aws-snippets)
+;;; aws-snippets.el ends here
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ami-ls
+# key: ami-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-images --owners \$`(if (string-equal major-mode "eshell-mode")(message "{")(message "("))` aws --profile=$1 ec2 describe-security-groups --group-names 'Default' --query 'SecurityGroups[0].OwnerId' --output text `(if (string-equal major-mode "eshell-mode")(message "}")(message ")"))` --query "`(print aws-snippets-ami-ls-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-describe-auto-scaling-groups
+# key: asg-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling describe-auto-scaling-groups --query '`(print aws-snippets-autoscaling-describe-auto-scaling-groups-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-describe-launch-configurations
+# key: asl-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling describe-launch-configurations --query '`(print aws-snippets-autoscaling-describe-launch-configurations-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-update-auto-scaling-group-min-max
+# key: aws-autoscaling-update-auto-scaling-group-min-max
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} autoscaling update-auto-scaling-group --auto-scaling-group-name ${4:`(current-kill 0)`} --min-size $5 --max-size $6 $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-change-ls
+# key: cloud-change-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation list-change-sets --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-create-change-set
+# key: cloud-createchange
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} \
+${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} \
+cloudformation create-change-set \
+${4:--capabilities CAPABILITY_NAMED_IAM} \
+--stack-name '$5' \
+--change-set-name '$6' \
+--description '$7' \
+--parameters ${8:file://} \
+${9:--change-set-type=${10:$$(yas-choose-value '("CREATE" "UPDATE"))}}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-describe-change-set
+# key: cloud-descchange
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-change-set --stack-name ${4:`(current-kill 0)`} --change-set-name $5 --output ${6:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-describe-stack
+# key: cloud-desc
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-stacks --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-describe-stack-events
+# key: cloud-events-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation describe-stack-events --stack-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-ls
+# key: cloud-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudformation list-stacks --stack-status-filter ${4:$$(yas-choose-value '(
+"CREATE_COMPLETE"
+"CREATE_IN_PROGRESS"
+"CREATE_FAILED"
+"ROLLBACK_IN_PROGRESS"
+"ROLLBACK_FAILED"
+"ROLLBACK_COMPLETE"
+"DELETE_IN_PROGRESS"
+"DELETE_FAILED"
+"DELETE_COMPLETE"
+"UPDATE_IN_PROGRESS"
+"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"
+"UPDATE_COMPLETE"
+"UPDATE_ROLLBACK_IN_PROGRESS"
+"UPDATE_ROLLBACK_FAILED"
+"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS"
+"UPDATE_ROLLBACK_COMPLETE"
+"REVIEW_IN_PROGRESS"
+"CREATE_IN_PROGRESS CREATE_FAILED CREATE_COMPLETE ROLLBACK_IN_PROGRESS ROLLBACK_FAILED ROLLBACK_COMPLETE DELETE_IN_PROGRESS DELETE_FAILED UPDATE_IN_PROGRESS UPDATE_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_COMPLETE UPDATE_ROLLBACK_IN_PROGRESS UPDATE_ROLLBACK_FAILED UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_ROLLBACK_COMPLETE REVIEW_IN_PROGRESS"
+))} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-validate-template
+# key: cloud-val-temp
+# group: aws
+# --
+aws --profile=test --region=us-east-1 cloudformation validate-template --template-body file://${1:`(current-kill 0)`} --output ${2:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudtrail-lookup-events
+# key: cloudtrail-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} cloudtrail lookup-events --max-items ${4:100} --lookup-attributes AttributeKey=${5:$$(yas-choose-value '("ResourceType,AttributeValue=AWS::EC2::Instance" "ResourceName,AttributeValue="))}$6 --output ${7:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-delete-snapshot (yank)
+# key: snap-del
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 delete-snapshot --snapshot-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-delete-volume (yank)
+# key: ebs-del
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 delete-volume --volume-id ${4:`(current-kill 0)`} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-describe-instance-attribute (yank)
+# key: ec2-attribute
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-attribute --instance-id ${4:`(current-kill 0)`} --attribute ${5:$$(yas-choose-value '("instanceType" "kernel" "ramdisk" "userData" "disableApiTermination" "instanceInitiatedShutdownBehavior" "rootDeviceName" "blockDeviceMapping" "productCodes" "sourceDestCheck" "groupSet" "ebsOptimized" "sriovNetSupport"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-describe-instance-status (yank)
+# key: aws-ec2-describe-instance-status
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-status --instance-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-describe-userdata (yank)
+# key: ec2-userdata
+# group: aws
+# --
+(base64-decode-string (shell-command-to-string "aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instance-attribute --instance-id ${4:`(current-kill 0)`} --attribute userData --query 'UserData.Value' --output text"))$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-console-output (yank)
+# key: ec2-console
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 get-console-output --output text --instance-id ${4:`(current-kill 0)`} >#<buffer *$4-console-output*> $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-dns-names
+# key: aws-ec2-get-dns-names
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --filters "Name=tag:Name,Values=$4" --query "`(print aws-snippets-ec2-get-dns-names-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-instance-details (yank)
+# key: ec2-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --instance-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-instance-volumes
+# key: ec2-vol
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query "`(print aws-snippets-ec2-get-instance-volumes-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-securitygroup-details (yank)
+# key: sg-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-groups --group-ids ${4:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-securitygroup-references (yank)
+# key: aws-ec2-get-securitygroup-references
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-group-references --group-id ${4:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-securitygroups
+# key: sg-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-security-groups --query "`(print aws-snippets-ec2-get-securitygroups-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-snapshot-details (yank)
+# key: snap-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --snapshot-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-snapshots
+# key: snap-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-snapshots --query '`(print aws-snippets-ec2-get-snapshots-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-volumes
+# key: ebs-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --query '`(print aws-snippets-ec2-get-volumes-query)`' --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-get-volumes-unused
+# key: ebs-ls-avail
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --query '`(print aws-snippets-ec2-get-volumes-unused-query)`' --filters Name=status,Values=available --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-instance-running
+# key: ec2state
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-instances --instance-ids ${4:`(current-kill 0)`} --query "`(print aws-snippets-ec2-instance-running-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-list-instances
+# key: ec2-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-instances --query '${4:$$(yas-choose-value aws-snippets-ec2-list-instances-query)}' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-list-subnets
+# key: sub-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-subnets --query "`(print aws-snippets-ec2-list-subnets-query)`" --output ${4:$$(yas-choose-value '("table" "text" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-list-vpcs
+# key: vpc-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 describe-vpcs --query "`(print aws-snippets-ec2-list-vpcs-query)`" --output ${4:$$(yas-choose-value '("table" "text" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-start-stop-instance (yank)
+# key: ec2-start
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ec2 ${4:$$(yas-choose-value '("start-instances" "stop-instances" "reboot-instances"))} --instance-ids ${5:`(current-kill 0)`} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-volume-details (yank)
+# key: ebs-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} ec2 describe-volumes --volume-ids ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-describe-instance-health (yank)
+# key: aws-elb-describe-instance-health
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-instance-health --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-describe-load-balancer (yank)
+# key: elb-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancers --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-describe-load-balancer-attributes (yank)
+# key: aws-elb-describe-load-balancer-attributes
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancer-attributes --load-balancer-name ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-get-list
+# key: elb-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} elb describe-load-balancers --query "`(print aws-snippets-elb-get-list-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-search
+# key: aws-elb-search
+# group: aws
+# --
+for REGION in `(mapconcat 'identity aws-snippets-regions " ")`; do
+ for BALANCER in \`aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=\${REGION} elb describe-load-balancers --query "reverse(sort_by(LoadBalancerDescriptions, &CreatedTime)[].[LoadBalancerName])" --output text\`; do
+ aws --profile=$1 --region=\${REGION} elb describe-load-balancers --load-balancer-name \${BALANCER} --output text | awk "{print \\"\${REGION}:\${BALANCER}:\\"\\\$0}"
+ done
+done $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-emr-describe-cluster (yank)
+# key: aws-emr-describe-cluster
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=${2:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} emr describe-cluster --cluster-id ${3: `(current-kill 0)`} --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-emr-list-clusters
+# key: emr-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} --region=${2:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} emr list-clusters --active --query '`(print aws-snippets-emr-list-clusters-query)`' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-filters
+# key: awsfil
+# group: aws
+# --
+--filters "Name=${1:$$(yas-choose-value aws-snippets-filters)},Values=$2" $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-logs-get-groups
+# key: logs-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} logs describe-log-groups --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-logs-set-retention
+# key: logs-set-ret
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)}} logs put-retention-policy --log-group-name ${4:`(current-kill 0)`} --retention-in-days ${5:$$(yas-choose-value '( "60" "1" "3" "5" "7" "14" "30" "90" "120" "150" "180" "365" "400" "545" "731" "1827" "3653"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-policy-ls
+# key: policy-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} iam list-policies --scope ${5:$$(yas-choose-value '("All" "AWS" "Local"))} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-describe-db-instance-details (yank)
+# key: rds-det
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-instances --db-instance-identifier ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-describe-db-instances
+# key: rds-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-instances --query "`(print aws-snippets-rds-describe-instances-query)`" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-describe-db-parameter-groups
+# key: aws-rds-describe-db-parameter-groups
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-parameter-groups --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-describe-parameters (yank)
+# key: aws-rds-describe-parameters
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} rds describe-db-parameters --db-parameter-group-name ${4:`(current-kill 0)`} --query "Parameters[*][ParameterName, ParameterValue]" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-region-loop
+# key: aws-region-loop
+# group: aws
+# --
+for REGION in `(mapconcat 'identity aws-snippets-regions " ")`; do
+$0
+done
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-regions
+# key: awsreg
+# group: aws
+# --
+--region=${1:$$(yas-choose-value "\$\{REGION\}" aws-snippets-regions)} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-list-hosted-zones
+# key: r53-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} route53 list-hosted-zones --query '`(print aws-snippets-route53-list-hosted-zones-query)`' --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-list-resource-record-sets (yank)
+# key: aws-route53-list-resource-record-sets
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} route53 list-resource-record-sets --hosted-zone-id ${2:`(current-kill 0)`} --query \"ResourceRecordSets[?contains(Name, '$3')]\" --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sns-ls
+# key: sns-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} sns list-topics --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ssm-start-session
+# key: ssm_
+# group: aws
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} ssm start-session --target ${4:`(current-kill 0)`} $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-support-describe
+# key: support-desc
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} support describe-communications --case-id ${4:`(current-kill 0)`} --output ${5:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-support-ls
+# key: support-ls
+# group: aws
+# --
+aws --profile=${1:$$(yas-choose-value aws-snippets-profiles)} ${2:--region=${3:$$(yas-choose-value aws-snippets-regions)}} support describe-cases --no-include-communications --query "`(print aws-snippets-aws-support-ls-query)`" --output ${4:$$(yas-choose-value '("text" "table" "json"))} $0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-group
+# key: autoscaling-group
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:-}" : {
+ "Type" : "AWS::AutoScaling::AutoScalingGroup",
+ "Properties" : {
+ "AvailabilityZones" : [${2:"--"}],
+ "LaunchConfigurationName" : ${3:"--"},
+ "MaxSize" : "${4:--}",
+ "MinSize" : "${5:--}",
+ "Tags" : [ {"Key" : "Name",
+ "Value" : "${6:"--"}",
+ "PropagateAtLaunch" : "True"}
+ ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-group-vpc
+# key: autoscaling-group-vpc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:-}" : {
+ "Type" : "AWS::AutoScaling::AutoScalingGroup",
+ "Properties" : {
+ "AvailabilityZones" : [
+ ${2:azs}
+ ],
+ "LaunchConfigurationName" : ${3:"-"},
+ "MaxSize" : "${4:-}",
+ "MinSize" : "${5:-}",
+ "VPCZoneIdentifier" : [ ${6:list of subnet ids} ],
+ "Tags" : [ {"Key" : "Name",
+ "Value" : "${7:-}",
+ "PropagateAtLaunch" : "True"}
+ ]
+ }
+}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-availibility-zone
+# key: availability-zone
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{"Fn::Join" : ["",[{"Ref" : "AWS::Region"},"${1:a}" ] ]}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-authentication
+# key: cloudformation-authentication
+# group: cloudformation
+# --
+"AWS::CloudFormation::Authentication": {
+ "${1:AccessCreds}": {
+ "type": "$2",
+ "buckets": [ "$3" ],
+ "roleName": "$4",
+ "accessKeyId": "$5",
+ "secretKey": "$6",
+ "uris": [ "$7" ],
+ "username": "$8",
+ "password": "$9"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-customresource
+# key: cloudformation-customresource
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:customResource}": {
+ "Type": "AWS::CloudFormation::CustomResource",
+ "Version": "1.0",
+ "Properties": {
+ "ServiceToken": "$2"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-init
+# key: cloudformation-init
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"AWS::CloudFormation::Init": {
+ "config": {
+ "packages": {
+ $0
+ },
+ "groups": {
+ },
+ "users": {
+ },
+ "sources": {
+ },
+ "files": {
+ },
+ "commands": {
+ },
+ "services": {
+ }
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-stack
+# key: cloudformation-stack
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:cloudFormationStack}": {
+ "Type": "AWS::CloudFormation::Stack",
+ "Properties": {
+ "NotificationARNs": [ "$2" ],
+ "Parameters": { $3 },
+ "TemplateURL": "$4",
+ "TimeoutInMinutes": "$5"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-waitcondition
+# key: cloudformation-waitcondition
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:waitCondition}": {
+ "Type": "AWS::CloudFormation::WaitCondition",
+ "Properties": {
+ "Count": "$2",
+ "Handle": "$3",
+ "Timeout": "$4"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-waitconditionhandle
+# key: cloudformation-waitconditionhandle
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:waitConditionHandle}": {
+ "Type" : "AWS::CloudFormation::WaitConditionHandle",
+ "Properties" : {
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudfront-distribution
+# key: cloudfront-distribution
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:cloudfrontDistribution}": {
+ "Type": "AWS::CloudFront::Distribution",
+ "Properties": {
+ "DistributionConfig": $2
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudtrail
+# key: cloudtrail
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:cloudTrail}": {
+ "Type": "AWS::CloudTrail::Trail",
+ "Properties": {
+ "S3BucketName": "$2",
+ "IncludeGlobalServiceEvents": "${3:$$(yas-choose-value '("true" "false")}",
+ "IsLogging": "${4:$$(yas-choose-value '("true" "false"))}",
+ "S3KeyPrefix": "$5",
+ "SnsTopicName": "$6"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudwatch-alarm
+# key: cloudwatch-alarm
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:cloudWatchAlarm}": {
+ "Type": "AWS::CloudWatch::Alarm",
+ "Properties": {
+ "MetricName": "$2",
+ "Namespace": "$3",
+ "ComparisonOperator": "$4",
+ "EvaluationPeriods": "$5",
+ "Period": "$6",
+ "Statistic": "$7",
+ "Threshold": "$8",
+ "ActionsEnabled": "${9:$$(yas-choose-value '("true" "false"))}",
+ "AlarmActions": [ "$10" ],
+ "AlarmDescription": "$11",
+ "AlarmName": "$12",
+ "Dimensions": [ "$13" ],
+ "InsufficientDataActions": [ "$14" ],
+ "OKActions": [ "$15" ],
+ "Unit": "$16"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-dynamodb-table
+# key: dynamodb-table
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:dynamodbTable}": {
+ "Type": "AWS::DynamoDB::Table",
+ "Properties": {
+ "AttributeDefinitions": [ $2 ],
+ "GlobalSecondaryIndexes": [ $3 ],
+ "KeySchema": [ $4 ],
+ "LocalSecondaryIndexes": [ $5 ],
+ "ProvisionedThroughput": { $6 },
+ "TableName": "$7"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-instance
+# key: ec2-instance
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:-}": {
+ "Type": "AWS::EC2::Instance",
+ "Properties": {
+ "KeyName": ${2:-},
+ "DisableApiTermination": "${3:$$(yas-choose-value '("true" "false"))}",
+ "ImageId": { ${4:-} },
+ "InstanceType": "${5:-}",
+ "Monitoring": "${6:$$(yas-choose-value '("true" "false"))}",
+ "SecurityGroupIds" : [${7:-}],
+ "Tags": [
+ {
+ "Key": "${8:-}",
+ "Value": "${9:-}"
+ }
+ ],
+ "UserData": {
+ "Fn::Base64": {
+ "Fn::Join": [
+ "",
+ [
+ "#!/bin/bash -ex",
+ "${10:-}"
+ ]
+ ]
+ }
+ }
+ }
+}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-volume
+# key: ec2-volume
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:ec2Volume}": {
+ "Type": "AWS::EC2::Volume",
+ "Properties": {
+ "AutoEnableIO": "${2:$$(yas-choose-value '("true" "false"))}",
+ "AvailabilityZone": "${3:-}",
+ "Encrypted": "${4:$$(yas-choose-value '("true" "false"))}",
+ "KmsKeyId": "${5:-}",
+ "Size": "${6:-}",
+ "SnapshotId": "${7:snap-}",
+ "Tags": [
+ {
+ "Key": "${8:-}",
+ "Value": "${9:-}"
+ }
+ ],
+ "VolumeType" : "${10:$$(yas-choose-value '("standard" "io1" "gp2"))}"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-eip-vpc
+# key: eip-vpc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:eipName}": {
+ "Type": "AWS::EC2::EIP",
+ "Properties": {
+ "Domain": "vpc",
+ "InstanceId": ${2:"--"}
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elastic-load-balancer
+# key: elastic-load-balancer
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:-}": {
+ "Type": "AWS::ElasticLoadBalancing::LoadBalancer",
+ "Properties": {
+ "AvailabilityZones" : [ "${2:-}" ],
+ "Listeners" : [ ${3:-} ],
+ "Tags": [
+ {
+ "Key": "${4:-}",
+ "Value": "${5:-}"
+ }
+ ]
+ }
+}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elastic-load-balancer-vpc
+# key: elastic-load-balancer-vpc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:-}": {
+ "Type": "AWS::ElasticLoadBalancing::LoadBalancer",
+ "Properties": {
+ "Listeners" : [ ${2:-} ],
+ "SecurityGroups" : [ ${3:-} ],
+ "Subnets" : [ ${4:-} ],
+ "Tags": [
+ {
+ "Key": "${5:-}",
+ "Value": "${6:-}"
+ }
+ ]
+ }
+}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elastic-load-balancer-vpc-internal
+# key: elastic-load-balancer-vpc-internal
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:-}": {
+ "Type": "AWS::ElasticLoadBalancing::LoadBalancer",
+ "Properties": {
+ "Listeners" : [ ${2:-} ],
+ "Scheme" : "internal",
+ "SecurityGroups" : [ ${3:-} ],
+ "Subnets" : [ ${4:-} ],
+ "Tags": [
+ {
+ "Key": "${5:-}",
+ "Value": "${6:-}"
+ }
+ ]
+ }
+}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-cachecluster
+# key: elasticche-cachecluster
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:elasticacheCacheCluster}": {
+ "Type": "AWS::ElastiCache::CacheCluster",
+ "Properties":
+ {
+ "AutoMinorVersionUpgrade": "${2:$$(yas-choose-value '("true" "false"))}",
+ "AZMode": "$3",
+ "CacheNodeType": "$4",
+ "CacheParameterGroupName": "$5",
+ "CacheSecurityGroupNames": [ "$6" ],
+ "CacheSubnetGroupName": "$7",
+ "ClusterName": "$8",
+ "Engine": "$9",
+ "EngineVersion": "$10",
+ "NotificationTopicArn": "$11",
+ "NumCacheNodes": "$12",
+ "Port": "$13",
+ "PreferredAvailabilityZone": "$14",
+ "PreferredAvailabilityZones": [ "$15" ],
+ "PreferredMaintenanceWindow": "$16",
+ "SnapshotArns": ["$17" ],
+ "SnapshotRetentionLimit": "$18",
+ "SnapshotWindow": "$19",
+ "VpcSecurityGroupIds": [ "$20" ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-parametergroup
+# key: elasticache-parametergroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:elastiicacheParameterGroup}": {
+ "Type": "AWS::ElastiCache::ParameterGroup",
+ "Properties": {
+ "CacheParameterGroupFamily": "$2",
+ "Description": "$3",
+ "Properties": { "$4": "$5" }
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-securitygroup
+# key: elasticache-securitygroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:elasticacheSecurityGroup}": {
+ "Type": "AWS::ElastiCache::SecurityGroup",
+ "Properties":
+ {
+ "Description": "$2"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-securitygroupingress
+# key: elasticache-securitygroupingress
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:elasticacheSecurityGroupIngress}": {
+ "Type": "AWS::ElastiCache::SecurityGroupIngress",
+ "Properties":
+ {
+ "CacheSecurityGroupName": "$2",
+ "EC2SecurityGroupName": "$3",
+ "EC2SecurityGroupOwnerId": "$4"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-subnetgroup
+# key: elasticache-subnetgroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:elasticacheSubnetGroup}": {
+ "Type": "AWS::ElastiCache::SubnetGroup",
+ "Properties": {
+ "Description": "$2",
+ "SubnetIds": [ "$3" ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticbeanstalk-application
+# key: elasticbeanstalk-application
+# group: cloudformation
+# --
+"${1:elasticbeanstalkApplication}": {
+ "Type": "AWS::ElasticBeanstalk::Application",
+ "Properties": {
+ "ApplicationName": "$2",
+ "Description": "$3"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticbeanstalk-applicationversion
+# key: elasticbeanstalk-applicationversion
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:elasticbeanstalkApplicationVersion}": {
+ "Type": "AWS::ElasticBeanstalk::ApplicationVersion",
+ "Properties": {
+ "ApplicationName": "$2",
+ "Description": "$3",
+ "SourceBundle": { $4 }
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticbeanstalk-configurationtemplate
+# key: elasticbeanstalk-configurationtemplate
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:elasticbeanstalkConfigurationTemplate}": {
+ "Type": "AWS::ElasticBeanstalk::ConfigurationTemplate",
+ "Properties": {
+ "ApplicationName": "$2",
+ "Description": "$3",
+ "EnvironmentId": "$4",
+ "OptionSettings": [ $5 ],
+ "SolutionStackName": "$6",
+ "SourceConfiguration": $7
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticbeanstalk-environment
+# key: elasticbeanstalk-environment
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:elasticbeanstalkEnvironment}": {
+ "Type": "AWS::ElasticBeanstalk::Environment",
+ "Properties": {
+ "ApplicationName": "$2",
+ "CNAMEPrefix": "$3",
+ "Description": "$4",
+ "EnvironmentName": "$5",
+ "OptionSettings": [ $6 ],
+ "SolutionStackName": "$7",
+ "TemplateName": "$8",
+ "Tier": "$9",
+ "VersionLabel": "$10"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-listener
+# key: elb-listener
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{
+ "InstancePort" : "${1:-}",
+ "InstanceProtocol" : "${2:$$(yas-choose-value '("HTTP" "HTTPS" "TCP" "SSL"))}",
+ "LoadBalancerPort" : "${3:-}",
+ "Protocol" : "${4:$$(yas-choose-value '("HTTP" "HTTPS" "TCP" "SSL"))}"
+}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-find-in-map
+# key: find-in-map
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"Fn::FindInMap": [
+ "${1:map}",
+ "${2:selector}",
+ "${3:value}"
+]$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-get-attr
+# key: get-attr
+# group: cloudformation
+# --
+{ "Fn::GetAtt" : [ "${1:logicalNameOfResource}", "${2:attributeName}" ]}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-accesskey
+# key: iam-accesskey
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:iamAccessKey}": {
+ "Type": "AWS::IAM::AccessKey",
+ "Properties": {
+ "Status": "$2",
+ "UserName": "$3",
+ "Serial": "$4"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-group
+# key: iam-group
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:iamGroup}": {
+ "Type": "AWS::IAM::Group",
+ "Properties": {
+ "Path": "$2",
+ "Policies": [ "$3" ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-instanceprofile
+# key: iam-instanceprofile
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:iamInstanceProfile}": {
+ "Type": "AWS::IAM::InstanceProfile",
+ "Properties": {
+ "Path": "${2:/}",
+ "Roles": [ "$3" ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-policy
+# key: iam-policy
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:iamPolicy}": {
+ "Type": "AWS::IAM::Policy",
+ "Properties": {
+ "Groups" : [ "$2" ],
+ "PolicyDocument" : {$3},
+ "PolicyName" : "$4",
+ "Roles" : [ "$5" ],
+ "Users" : [ "$6" ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-role
+# key: iam-role
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:iamRole}": {
+ "Type": "AWS::IAM::Role",
+ "Properties": {
+ "AssumeRolePolicyDocument": { $2 },
+ "Path": "$3",
+ "Policies": [ $4 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-user
+# key: iam-user
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:iamUser}": {
+ "Type": "AWS::IAM::User",
+ "Properties": {
+ "Path": "${2:/}",
+ "Groups": [ "$3" ],
+ "LoginProfile": { "Password" : "$4" },
+ "Policies": [ $5 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-usertogroupaddition
+# key: iam-usertogroupaddition
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:iamUserToGroupAddition}": {
+ "Type": "AWS::IAM::UserToGroupAddition",
+ "Properties": {
+ "GroupName": "$2",
+ "Users": [ "$3" ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-internet-gateway
+# key: internet-gateway
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:igwName}": {
+ "Type": "AWS::EC2::InternetGateway",
+ "Properties": {
+ "Tags": [${2:"-"}]
+ }
+},
+"AttachGateway": {
+ "Type": "AWS::EC2::VPCGatewayAttachment",
+ "Properties": {
+ "VpcId": ${3:"--"},
+ "InternetGatewayId": { "Ref": "$1" }
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-join
+# key: join
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{"Fn::Join" : ["",[ ${1:"prefix"}, ${2:"suffix"} ] ]}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-kinesis-stream
+# key: kinesis-stream
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:kinesisStream}": {
+ "Type": "AWS::Kinesis::Stream",
+ "Properties": {
+ "ShardCount": "$2"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-launch-config
+# key: launch-config
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:launchConfigName}": {
+ "Type" : "AWS::AutoScaling::LaunchConfiguration",
+ "Properties" : {
+ "IamInstanceProfile" : ${2:"--"},
+ "ImageId" : ${3:"--"},
+ "InstanceMonitoring" : ${4:"--"},
+ "InstanceType" : "${5:--}",
+ "KeyName" : ${6:"--"},
+ "SecurityGroups" : [ ${7:"--"} ],
+ "UserData" : {
+ "Fn::Base64":
+ { "Fn::Join": [
+ "",
+ [
+ "#!/bin/bash -ex",
+ "${8:-}"
+ ]
+ ]
+ }
+ }
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-logs-loggroup
+# key: logs-loggroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:logLogGroup}": {
+ "Type": "AWS::Logs::LogGroup",
+ "Properties": {
+ "RetentionInDays": "${2}"
+ }
+}
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-logs-metricfilter
+# key: logs-metricfilter
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:logsMetricFilter}": {
+ "Type": "AWS::Logs::MetricFilter",
+ "Properties": {
+ "FilterPattern": [ "$2" ],
+ "LogGroupName": "$3",
+ "MetricTransformations": [ $4 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-map
+# key: map
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:mapName}": {
+ "${2:selector}": {
+ "${3:key}": "${4:val}"
+ },
+ "${5:selector}": {
+ "${6:key}": "${7:val}"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-map-item
+# key: map-item
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:selector}": {
+"${2:key}": "${3:val}"
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-app
+# key: opsworks-app
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:opsworksApp}": {
+ "Type": "AWS::OpsWorks::App",
+ "Properties": {
+ "Name": "$2",
+ "StackId": "$3",
+ "Type": "$4",
+ "AppSource": { $5 },
+ "Attributes": { $6:$7 },
+ "Description": "$8",
+ "Domains": [ "$9" ],
+ "EnableSsl": "${10:$$(yas-choose-value '("true" "false"))}",
+ "Shortname": "$11",
+ "SslConfiguration": { $12 }
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-elasticloadbalancerattachment
+# key: opsworks-elasticloadbalancerattachment
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:opsworksElasticLoadBalancerAttachment}": {
+ "Type": "AWS::OpsWorks::ElasticLoadBalancerAttachment",
+ "Properties": {
+ "ElasticLoadBalancerName": "$2",
+ "LayerId": "$3"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-instance
+# key: opsworks-instance
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:opsworksInstance}": {
+ "Type": "AWS::OpsWorks::Instance",
+ "Properties": {
+ "InstanceType": "$2",
+ "LayerIds": [ "$3" ],
+ "StackId": "$4",
+ "AmiId": "$5",
+ "Architecture": "$6",
+ "AutoScalingType": "$7",
+ "AvailabilityZone": "$8",
+ "InstallUpdatesOnBoot": "${9:$$(yas-choose-value '("true" "false"))}",
+ "Os": "$10",
+ "RootDeviceType": "$11",
+ "SshKeyName": "$12",
+ "SubnetId": "$13",
+ "TimeBasedAutoScaling": { $14 }
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-layer
+# key: opsworks-layer
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:opsworksLayer}": {
+ "Type": "AWS::OpsWorks::Layer",
+ "Properties": {
+ "AutoAssignElasticIps": "${2:$$(yas-choose-value '("true" "false"))}",
+ "AutoAssignPublicIps": "${3:$$(yas-choose-value '("true" "false"))}",
+ "EnableAutoHealing": "${4:$$(yas-choose-value '("true" "false"))}",
+ "Name": "$5",
+ "Shortname": "$6",
+ "StackId": "$7",
+ "Type": "$8",
+ "Attributes": { "$9":"$10" },
+ "CustomInstanceProfileArn": "$11",
+ "CustomRecipes": $12,
+ "CustomSecurityGroupIds": [ "$13" ],
+ "InstallUpdatesOnBoot": "${14:$$(yas-choose-value '("true" "false"))}",
+ "LoadBasedAutoScaling": { $15 },
+ "Packages": [ "$16" ],
+ "VolumeConfigurations": [ $17 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-stack
+# key: opsworks-stack
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:opsworksStack}": {
+ "Type": "AWS::OpsWorks::Stack",
+ "Properties": {
+ "DefaultInstanceProfileArn": "$2",
+ "Name": "$3",
+ "ServiceRoleArn": "$4",
+ "Attributes": { "$5":"$6" },
+ "ChefConfiguration": { $7 },
+ "ConfigurationManager": { $8 },
+ "CustomCookbooksSource": { $9 },
+ "CustomJson": { $10 },
+ "DefaultAvailabilityZone": "$11",
+ "DefaultOs": "$12",
+ "DefaultRootDeviceType": "$13",
+ "DefaultSshKeyName": "$14",
+ "DefaultSubnetId": "$15",
+ "HostnameTheme": "$16",
+ "UseCustomCookbooks": "${17:$$(yas-choose-value '("true" "false"))}",
+ "UseOpsworksSecurityGroups": "${18:$$(yas-choose-value '("true" "false"))}",
+ "VpcId": "$19"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-output
+# key: output
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:name}": {
+ "Value": "${2:Value to return}",
+ "Description": "${3:Information about the value}",
+ "Export": {
+ "Name": "${4:Value to export}"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-parameter
+# key: parameter
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:paramName}": {
+ "Description": "${2:-}",
+ "Type": "${3:$$(yas-choose-value '("String" "Number" "CommaDelimitedList"))}",
+ "Default": "${4:-}"
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbinstance
+# key: rds-dbinstance
+# group: cloudformation
+# --
+"${1:rdsDBInstance}": {
+ "Type": "AWS::RDS::DBInstance",
+ "Properties": {
+ "AllocatedStorage": "${2}",
+ "DBInstanceClass": "${3}",
+ "AllowMajorVersionUpgrade": "${4:$$(yas-choose-value '("true" "false"))}",
+ "AutoMinorVersionUpgrade": "${5:$$(yas-choose-value '("true" "false"))}",
+ "AvailabilityZone": "$6",
+ "BackupRetentionPeriod": "$7",
+ "CharacterSetName": "$8",
+ "DBInstanceIdentifier": "$9",
+ "DBName": "$10",
+ "DBParameterGroupName": "$11",
+ "DBSecurityGroups": [ "$12" ],
+ "DBSnapshotIdentifier": "$13",
+ "DBSubnetGroupName": "$14",
+ "Engine": "$15",
+ "EngineVersion": "$16",
+ "Iops": "$17",
+ "KmsKeyId": "$18",
+ "LicenseModel": "$19",
+ "MasterUsername": "$20",
+ "MasterUserPassword": "$21",
+ "MultiAZ": "${22:$$(yas-choose-value '("true" "false"))}",
+ "OptionGroupName": "$23",
+ "Port": "$24",
+ "PreferredBackupWindow": "$25",
+ "PreferredMaintenanceWindow": "$26",
+ "PubliclyAccessible": "${27:$$(yas-choose-value '("true" "false"))}",
+ "SourceDBInstanceIdentifier": "$28",
+ "StorageEncrypted": "${29:$$(yas-choose-value '("true" "false"))}",
+ "StorageType": "$30",
+ "Tags": [ $31 ],
+ "VPCSecurityGroups": [ "$32" ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbparametergroup
+# key: rds-dbparametergroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:rdsDBParameterGroup}": {
+ "Type": "AWS::RDS::DBParameterGroup",
+ "Properties": {
+ "Description": "$2",
+ "Family": "$3",
+ "Parameters": {$4},
+ "Tags": [ $5 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbsecuritygroup
+# key: rds-dbsecuritygroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:rdsDBSecurityGroup}": {
+ "Type": "AWS::RDS::DBSecurityGroup",
+ "Properties": {
+ "EC2VpcId": { $2 },
+ "DBSecurityGroupIngress": [ $3 ],
+ "GroupDescription": "$4",
+ "Tags": [ $5 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbsecuritygroupingress
+# key: rds-dbsecuritygroupingress
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{
+ "CIDRIP": "$1",
+ "DBSecurityGroupName": "$2",
+ "EC2SecurityGroupId": "$3",
+ "EC2SecurityGroupName": "$4",
+ "EC2SecurityGroupOwnerId": "$5"
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbsubnetgroup
+# key: rds-dbsubnetgroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:rdsDBSubnetGroup}": {
+ "Type": "AWS::RDS::DBSubnetGroup",
+ "Properties": {
+ "DBSubnetGroupDescription": "$2",
+ "SubnetIds": [ "$3" ],
+ "Tags": [ $4 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-eventsubscription
+# key: rds-eventsubscription
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:rdsEventSubscription}": {
+ "Type": "AWS::RDS::EventSubscription",
+ "Properties": {
+ "Enabled": "${2:$$(yas-choose-value '("true" "false"))}",
+ "EventCategories": [ "$3" ],
+ "SnsTopicArn": "$4",
+ "SourceIds": [ "$5" ],
+ "SourceType ": "$6"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-cluster
+# key: redshift-cluster
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:redshiftCluster}": {
+ "Type": "AWS::Redshift::Cluster",
+ "Properties": {
+ "AllowVersionUpgrade": "${2:$$(yas-choose-value '("true" "false"))}",
+ "AutomatedSnapshotRetentionPeriod": "$3",
+ "AvailabilityZone": "$4",
+ "ClusterParameterGroupName": "$5",
+ "ClusterSecurityGroups": [ "$6" ],
+ "ClusterSubnetGroupName": "$7",
+ "ClusterType": "$8",
+ "ClusterVersion": "$9",
+ "DBName": "$10",
+ "ElasticIp": "$11",
+ "Encrypted": "${12:$$(yas-choose-value '("true" "false"))}",
+ "HsmClientCertificateIdentifier": "$13",
+ "HsmConfigurationIdentifier": "$14",
+ "MasterUsername": "$15",
+ "MasterUserPassword": "$16",
+ "NodeType": "$17",
+ "NumberOfNodes": "$18",
+ "OwnerAccount": "$19",
+ "Port": "$20",
+ "PreferredMaintenanceWindow": "$21",
+ "PubliclyAccessible": "${22:$$(yas-choose-value '("true" "false"))}",
+ "SnapshotClusterIdentifier": "$23",
+ "SnapshotIdentifier": "$24",
+ "VpcSecurityGroupIds": [ "$25" ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-clusterparametergroup
+# key: redshift-clusterparametergroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:redshiftClusterParameterGroup}": {
+ "Type": "AWS::Redshift::ClusterParameterGroup",
+ "Properties": {
+ "Description": "$2",
+ "ParameterGroupFamily": "$3",
+ "Parameters": [ $4 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-clustersecuritygroup
+# key: redshift-clustersecuritygroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:redshiftClusterSecurityGroup}": {
+ "Type": "AWS::Redshift::ClusterSecurityGroup",
+ "Properties": {
+ "Description": "$2"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-clustersecuritygroupingress
+# key: redshift-clustersecuritygroupingress
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:redshiftClusterSecurityGroupIngress}": {
+ "Type": "AWS::Redshift::ClusterSecurityGroupIngress",
+ "Properties": {
+ "ClusterSecurityGroupName": "$2",
+ "CIDRIP": "$3",
+ "EC2SecurityGroupName": "$4",
+ "EC2SecurityGroupOwnerId": "$5"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-clustersubnetgroup
+# key: redshift-clustersubnetgroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:redshiftClusterSubnetGroup}": {
+ "Type": "AWS::Redshift::ClusterSubnetGroup",
+ "Properties": {
+ "Description": "$2",
+ "SubnetIds": [ "$3" ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ref
+# key: ref
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{ "Ref": "${1:logicalName}" }$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-resource
+# key: resource
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:resourceName}": {
+ "Description": "${2:-}",
+ "Type": "${3:-}",
+ "Properties": "${4:-}"
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route
+# key: route
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:routeName}": {
+ "Type": "AWS::EC2::Route",
+ "Properties": {
+ "RouteTableId": ${2:"--"},
+ "DestinationCidrBlock": "${3:"--"}",
+ "GatewayId": ${4:"--"}
+ }
+}$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route-table
+# key: route-table
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:routeTableName}": {
+ "Type": "AWS::EC2::RouteTable",
+ "Properties": {
+ "VpcId": ${2:"--"},
+ "Tags": [${3:"--"}]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route-table-assoc
+# key: route-table-assoc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:routeTableAssocName"}: {
+ "Type": "AWS::EC2::SubnetRouteTableAssociation",
+ "Properties": {
+ "SubnetId": ${2:"--"},
+ "RouteTableId": ${3:"--"}
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-healthcheck
+# key: route53-healthcheck
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:route53HealthCheck}": {
+ "Type": "AWS::Route53::HealthCheck",
+ "Properties": {
+ "HealthCheckConfig": { $2 },
+ "HealthCheckTags": [ $3 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-hostedzone
+# key: route53-hostedzone
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"$1": {
+ "Type": "AWS::Route53::HostedZone",
+ "Properties": {
+ "Name": "$2",
+ "VPCs": "$3",
+ "HostedZoneConfig": {$4},
+ "HostedZoneTags": [$5]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-recordset
+# key: route53-recordset
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:route53RS}": {
+ "Type": "AWS::Route53::RecordSet",
+ "Properties": {
+ "Name": "$2",
+ "Type": "${3:$$(yas-choose-value '("A" "AAAA" "CNAME" "MX" "NS" "PTR" "SOA" "SPF" "SRV" "TXT"))}",
+ "AliasTarget": {$4},
+ "Comment": "$5",
+ "Failover": "$6",
+ "GeoLocation": {$7},
+ "HealthCheckId": "$8",
+ "HostedZoneId": "$9",
+ "HostedZoneName": "$10",
+ "Region": "$11",
+ "ResourceRecords": [ "$12" ],
+ "SetIdentifier": "$13",
+ "TTL": "$14",
+ "Weight": "$15"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-recordset-group
+# key: route53-recordset-group
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:route53RSGroup}": {
+ "Type": "AWS::Route53::RecordSetGroup",
+ "Properties": {
+ "HostedZoneId": "$2",
+ "HostedZoneName": "$3",
+ "RecordSets": [ {$4} ],
+ "Comment": "$5"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-s3-bucket
+# key: s3-bucket
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:s3Bucket}": {
+ "Type": "AWS::S3::Bucket",
+ "Properties": {
+ "AccessControl": "${2:$$(yas-choose-value '("true" "false" "Private" "PublicRead" "PublicReadWrite" "AuthenticatedRead" "LogDeliveryWrite" "BucketOwnerRead" "BucketOwnerFullControl"))}",
+ "BucketName": "$3",
+ "CorsConfiguration": {$4},
+ "LifecycleConfiguration": {$5},
+ "NotificationConfiguration": {$6},
+ "VersioningConfiguration": {$7},
+ "WebsiteConfiguration": {$8},
+ "Tags": [$9]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-s3-bucketpolicy
+# key: s3-bucketpolicy
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:s3BucketPolicy}": {
+ "Type": "AWS::S3::BucketPolicy",
+ "Properties": {
+ "Bucket" : "$2",
+ "PolicyDocument" : {$3}
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-security-group-egress-block
+# key: security-group-egress-block
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"SecurityGroupEgress" : [
+ ${1:--insert rules--}
+]$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-security-group
+# key: security-group
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:secGroupName}" : {
+ "Type" : "AWS::EC2::SecurityGroup",
+ "Properties": {
+ "GroupName": "${2:-}",
+ "GroupDescription": "${3:-}",
+ "SecurityGroupIngress": [
+ ${4:--insert rules--}
+ ],
+ "VpcId": ${5:ref-to-vpc},
+ "Tags": [ ${6:insert tag} ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-securitygroup-rule
+# key: sg-rule
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{
+"Description": "$1",
+"IpProtocol": "${2:$$(yas-choose-value '("tcp" "udp" "icmp" "-1"))}",
+"FromPort": $3,
+"ToPort": $4,
+"${5:$$(yas-choose-value '("SourceSecurityGroupId" "DestinationSecurityGroupId" "CidrIp" "CidrIpv6" "DestinationPrefixListId"))}": "$6"
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-select-list
+# key: select-list
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{ "Fn::Select" : [ ${1:$$(yas-choose-value '("0" "1" "etc"))}, {"Ref": "${2:list_name}"} ] }$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sg-egress-cidr
+# key: security-group-egress-cidr
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{ "IpProtocol" : "${1:$$(yas-choose-value '("tcp" "udp" "ip"))}", "FromPort" : "${2:-}", "ToPort" : "${3:-}", "CidrIp" : "${4:-}" }$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sg-ingress-cidr
+# key: security-group-ingress
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{ "IpProtocol" : "${1:$$(yas-choose-value '("tcp" "udp" "ip"))}", "FromPort" : "${2:-}", "ToPort" : "${3:-}", "CidrIp" : "${4:-}" }$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sns-topic
+# key: sns-topic
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:snsTopic}": {
+ "Type": "AWS::SNS::Topic",
+ "Properties": {
+ "DisplayName": "$2",
+ "Subscription": [ $3 ],
+ "TopicName": "$4"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sns-topicpolicy
+# key: sns-topicpolicy
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:snsTopicPolicy}": {
+ "Type": "AWS::SNS::TopicPolicy",
+ "Properties":
+ {
+ "PolicyDocument": {$2},
+ "Topics": [ {$3} ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sqs-queue
+# key: sqs-queue
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:sqsQueue}": {
+ "Type": "AWS::SQS::Queue",
+ "Properties": {
+ "DelaySeconds": "$2",
+ "MaximumMessageSize": "$3",
+ "MessageRetentionPeriod": "$4",
+ "QueueName": "$5",
+ "ReceiveMessageWaitTimeSeconds": "$6",
+ "RedrivePolicy": {$7},
+ "VisibilityTimeout": "$8"
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sqs-queuepolicy
+# key: sqs-queuepolicy
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:sqsQueuePolicy}": {
+ "Type": "AWS::SQS::QueuePolicy",
+ "Properties": {
+ "PolicyDocument": {$2},
+ "Queues": [ $3 ]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-start
+# key: start
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{
+ "AWSTemplateFormatVersion": "2010-09-09",
+ "Description": "${1}",
+ "Metadata": {
+
+ },
+ "Parameters": {
+
+ },
+ "Mappings": {
+
+ },
+ "Conditions": {
+
+ },
+ "Resources": {
+
+ },
+ "Outputs": {
+
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-subnet
+# key: subnet
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:subnetName}": {
+ "Type": "AWS::EC2::Subnet",
+ "Properties": {
+ "AvailabilityZone": ${2:"-"},
+ "VpcId": ${3:"-"},
+ "CidrBlock": ${4:"-"},
+ "Tags": [${5:"-"}]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-tag
+# key: tag
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+{ "Key": "${1:-}", "Value": ${2:"--"} }$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-vpc
+# key: vpc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:name}": {
+ "Type": "AWS::EC2::VPC",
+ "Properties": {
+ "CidrBlock": ${2:"----/--"},
+ "Tags": [${3:-}]
+ }
+}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-vpn-gateway
+# key: vpn-gateway
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+"${1:vgwName}": {
+ "Type": "AWS::EC2::VPNGateway",
+ "Properties": {
+ "Type": "ipsec.1",
+ "Tags": [${2:"--"}]
+ }
+},
+"AttachVpnGateway": {
+ "Type": "AWS::EC2::VPCGatewayAttachment",
+ "Properties": {
+ "VpcId": ${3:"--"},
+ "VpnGatewayId": { "Ref": "$1" }
+ }
+}$0
--- /dev/null
+shell-mode
+eshell-mode
--- /dev/null
+eshell-mode
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-group
+# key: autoscaling-group
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:-}:
+ Type: AWS::AutoScaling::AutoScalingGroup
+ Properties:
+ AvailabilityZones: ${2:"--"}
+ LaunchConfigurationName: ${3:"--"},
+ MaxSize: ${4:--}
+ MinSize: ${5:--}
+ Tags:
+ - Key: Name
+ Value: ${6:"--"}
+ PropagateAtLaunch: True
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-autoscaling-group-vpc
+# key: autoscaling-group-vpc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:-}:
+ Type: AWS::AutoScaling::AutoScalingGroup
+ Properties:
+ AvailabilityZones: ${2:azs}
+ LaunchConfigurationName: ${3:"-"}
+ MaxSize: ${4:-}
+ MinSize: ${5:-}
+ VPCZoneIdentifier:
+ - ${6:list of subnet ids}
+ Tags:
+ - Key: "${7:Name}"
+ Value: "${8:-}"
+ PropagateAtLaunch: "True"
+
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-availability-zone
+# key: availability-zone
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+!Join: ["",[ Ref: AWS::Region,"${1:a}" ] ]$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-authentication
+# key: cloudformation-authentication
+# group: cloudformation
+# --
+AWS::CloudFormation::Authentication:
+ ${1:AccessCreds}:
+ type: "$2"
+ buckets: "$3"
+ roleName: "$4"
+ accessKeyId: "$5"
+ secretKey: "$6"
+ uris: [ "$7" ]
+ username: "$8"
+ password: "$9"
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-customresource
+# key: cloudformation-customresource
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:customResource}:
+ Type: AWS::CloudFormation::CustomResource
+ Version: "1.0",
+ Properties:
+ ServiceToken: "$2"
+ $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-init
+# key: cloudformation-init
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+AWS::CloudFormation::Init:
+ config:
+ packages:
+ $0
+ groups:
+ users:
+ sources:
+ files:
+ commands:
+ services:
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-stack
+# key: cloudformation-stack
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:cloudFormationStack}:
+ Type: AWS::CloudFormation::Stack
+ Properties:
+ NotificationARNs:
+ - $2
+ Parameters:
+ - $3
+ TemplateURL: $4
+ TimeoutInMinutes: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-waitcondition
+# key: cloudformation-waitcondition
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:waitCondition}:
+ Type: AWS::CloudFormation::WaitCondition
+ Properties:
+ Count: $2
+ Handle: $3
+ Timeout: $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudformation-waitconditionhandle
+# key: cloudformation-waitconditionhandle
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:waitConditionHandle}:
+ Type: AWS::CloudFormation::WaitConditionHandle
+ Properties: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudfront-distribution
+# key: cloudfront-distribution
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:cloudfrontDistribution}:
+ Type: AWS::CloudFront::Distribution
+ Properties:
+ DistributionConfig: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudtrail
+# key: cloudtrail
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:cloudTrail}:
+ Type: AWS::CloudTrail::Trail
+ Properties:
+ S3BucketName: $2
+ IncludeGlobalServiceEvents: ${3:$$(yas-choose-value '("true" "false")}
+ IsLogging: ${4:$$(yas-choose-value '("true" "false"))}
+ S3KeyPrefix: $5
+ SnsTopicName: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-cloudwatch-alarm
+# key: cloudwatch-alarm
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:cloudWatchAlarm}:
+ Type: AWS::CloudWatch::Alarm
+ Properties:
+ MetricName: $2
+ Namespace: $3
+ ComparisonOperator: $4
+ EvaluationPeriods: $5
+ Period: $6
+ Statistic: $7
+ Threshold: $8
+ ActionsEnabled: ${9:$$(yas-choose-value '("true" "false"))}
+ AlarmActions:
+ - $10
+ AlarmDescription: $11
+ AlarmName: $12
+ Dimensions:
+ - $13
+ InsufficientDataActions:
+ - $14
+ OKActions:
+ - $15
+ Unit: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-dynamodb-table
+# key: dynamodb-table
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:dynamodbTable}:
+ Type: AWS::DynamoDB::Table
+ Properties:
+ AttributeDefinitions:
+ - $2
+ GlobalSecondaryIndexes:
+ - $3
+ KeySchema:
+ - $4
+ LocalSecondaryIndexes:
+ - $5
+ ProvisionedThroughput: $6
+ TableName: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-instance
+# key: ec2-instance
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:-}:
+ Type: AWS::EC2::Instance
+ Properties:
+ KeyName: ${2:-},
+ DisableApiTermination: ${3:$$(yas-choose-value '("true" "false"))}
+ ImageId: { ${4:-} }
+ InstanceType: ${5:-}
+ Monitoring: ${6:$$(yas-choose-value '("true" "false"))}
+ SecurityGroupIds:
+ - ${7:-}
+ Tags:
+ - Key: ${8:-}
+ Value: ${9:-}
+ UserData:
+ Fn::Base64:
+ !Join:
+ - ""
+ - "#!/bin/bash -ex"
+ - "${10:-}"
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ec2-volume
+# key: ec2-volume
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:ec2Volume}:
+ Type: AWS::EC2::Volume
+ Properties:
+ AutoEnableIO: ${2:$$(yas-choose-value '("true" "false"))}
+ AvailabilityZone: ${3:-}
+ Encrypted: ${4:$$(yas-choose-value '("true" "false"))}
+ KmsKeyId: "${5:-}",
+ Size: "${6:-}",
+ SnapshotId: ${7:snap-}
+ Tags:
+ - Key: ${8:-}
+ Value: ${9:-}
+ VolumeType: ${10:$$(yas-choose-value '("standard" "io1" "gp2"))}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-eip-vpc
+# key: eip-vpc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:eipName}:
+ Type: AWS::EC2::EIP
+ Properties:
+ Domain: "vpc",
+ InstanceId: ${2:"--"}
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elastic-load-balancer
+# key: elastic-load-balancer
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:-}:
+ Type: AWS::ElasticLoadBalancing::LoadBalancer
+ Properties:
+ AvailabilityZones:
+ - ${2:-}
+ Listeners:
+ - ${3:-}
+ Tags":
+ tag$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elastic-load-balancer-vpc
+# key: elastic-load-balancer-vpc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:-}:
+ Type: AWS::ElasticLoadBalancing::LoadBalancer
+ Properties:
+ Listeners:
+ - ${2:-}
+ SecurityGroups:
+ ${3:-}
+ Subnets:
+ - ${4:-}
+ Tags:
+ tag$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elastic-load-balancer-vpc-internal
+# key: elastic-load-balancer-vpc-internal
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:-}:
+ Type: AWS::ElasticLoadBalancing::LoadBalancer
+ Properties:
+ Listeners:
+ - ${2:-}
+ Scheme: "internal"
+ SecurityGroups:
+ - ${3:-}
+ Subnets:
+ - ${4:-}
+ Tags:
+ tag$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-cachecluster
+# key: elasticche-cachecluster
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:elasticacheCacheCluster}:
+ Type: AWS::ElastiCache::CacheCluster
+ Properties:
+ AutoMinorVersionUpgrade: ${2:$$(yas-choose-value '("true" "false"))}
+ AZMode: $3
+ CacheNodeType: $4
+ CacheParameterGroupName: $5
+ CacheSecurityGroupNames:
+ - $6
+ CacheSubnetGroupName: $7
+ ClusterName: $8
+ Engine: $9
+ EngineVersion: $10
+ NotificationTopicArn: $11
+ NumCacheNodes: $12
+ Port: $13
+ PreferredAvailabilityZone: $14
+ PreferredAvailabilityZones:
+ - $15
+ PreferredMaintenanceWindow: $16
+ SnapshotArns:
+ - $17
+ SnapshotRetentionLimit: $18
+ SnapshotWindow: $19
+ VpcSecurityGroupIds:
+ - $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-parametergroup
+# key: elasticache-parametergroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:elasticacheParameterGroup}:
+ Type: AWS::ElastiCache::ParameterGroup
+ Properties:
+ CacheParameterGroupFamily: $2
+ Description: $3
+ Properties:
+ $4: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-securitygroup
+# key: elasticache-securitygroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:elasticacheSecurityGroup}:
+ Type: AWS::ElastiCache::SecurityGroup
+ Properties:
+ Description: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-securitygroupingress
+# key: elasticache-securitygroupingress
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:elasticacheSecurityGroupIngress}:
+ Type: AWS::ElastiCache::SecurityGroupIngress
+ Properties:
+ CacheSecurityGroupName: $2
+ EC2SecurityGroupName: $3
+ EC2SecurityGroupOwnerId: $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticache-subnetgroup
+# key: elasticache-subnetgroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:elasticacheSubnetGroup}:
+ Type: AWS::ElastiCache::SubnetGroup
+ Properties:
+ Description: $2
+ SubnetIds:
+ - $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticbeanstalk-application
+# key: elasticbeanstalk-application
+# group: cloudformation
+# --
+${1:elasticbeanstalkApplication}:
+ Type: AWS::ElasticBeanstalk::Application
+ Properties:
+ ApplicationName: $2
+ Description: $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticbeanstalk-applicationversion
+# key: elasticbeanstalk-applicationversion
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:elasticbeanstalkApplicationVersion}:
+ Type: AWS::ElasticBeanstalk::ApplicationVersion
+ Properties:
+ ApplicationName: $2
+ Description: $3
+ SourceBundle:
+ $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticbeanstalk-configurationtemplate
+# key: elasticbeanstalk-configurationtemplate
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:elasticbeanstalkConfigurationTemplate}:
+ Type: AWS::ElasticBeanstalk::ConfigurationTemplate
+ Properties:
+ ApplicationName: $2
+ Description: $3
+ EnvironmentId: $4
+ OptionSettings:
+ - $5
+ SolutionStackName: $6
+ SourceConfiguration: $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elasticbeanstalk-environment
+# key: elasticbeanstalk-environment
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:elasticbeanstalkEnvironment}:
+ Type: AWS::ElasticBeanstalk::Environment
+ Properties:
+ ApplicationName: $2
+ CNAMEPrefix: $3
+ Description: $4
+ EnvironmentName: $5
+ OptionSettings:
+ - $6
+ SolutionStackName: $7
+ TemplateName: $8
+ Tier: $9
+ VersionLabel: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-elb-listener
+# key: elb-listener
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+InstancePort: ${1:-}
+InstanceProtocol: ${2:$$(yas-choose-value '("HTTP" "HTTPS" "TCP" "SSL"))}
+LoadBalancerPort: ${3:$1}
+Protocol: ${4:$$(yas-choose-value '("HTTP" "HTTPS" "TCP" "SSL"))}
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-find-in-map
+# key: find-in-map
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+!FindInMap
+ - ${1:map}
+ - ${2:selector}
+ - ${3:value}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-get-attr
+# key: get-attr
+# group: cloudformation
+# --
+!GetAtt [ ${1:logicalNameOfResource}, ${2:attributeName} ]$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-accesskey
+# key: iam-accesskey
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:iamAccessKey}:
+ Type: AWS::IAM::AccessKey
+ Properties:
+ Status: $2
+ UserName: $3
+ Serial: $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-group
+# key: iam-group
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:iamGroup}:
+ Type: AWS::IAM::Group
+ Properties:
+ Path: $2
+ Policies:
+ - $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-instanceprofile
+# key: iam-instanceprofile
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:iamInstanceProfile}:
+ Type: AWS::IAM::InstanceProfile
+ Properties:
+ Path: ${2:/}
+ Roles:
+ - $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-policy
+# key: iam-policy
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:iamPolicy}:
+ Type: AWS::IAM::Policy
+ Properties:
+ Groups:
+ - $2
+ PolicyDocument: {$3}
+ PolicyName: $4
+ Roles:
+ - $5
+ Users:
+ - $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-role
+# key: iam-role
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:iamRole}:
+ Type: AWS::IAM::Role
+ Properties:
+ AssumeRolePolicyDocument": $2
+ Path: $3
+ Policies:
+ - $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-user
+# key: iam-user
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:iamUser}:
+ Type: AWS::IAM::User
+ Properties:
+ Path: ${2:/}
+ Groups:
+ - $3
+ LoginProfile:
+ Password: "$4"
+ Policies:
+ - $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-iam-usertogroupaddition
+# key: iam-usertogroupaddition
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:iamUserToGroupAddition}:
+ Type: AWS::IAM::UserToGroupAddition
+ Properties:
+ GroupName: $2
+ Users:
+ - $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-internet-gateway
+# key: internet-gateway
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:igwName}:
+ Type: AWS::EC2::InternetGateway
+ Properties:
+ Tags:
+ tag$0
+AttachGateway:
+ Type: AWS::EC2::VPCGatewayAttachment
+ Properties:
+ VpcId: ${3:"--"}
+ InternetGatewayId: { "Ref": "$1" }
+
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-join
+# key: join
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+!Join [ "$1",[ ${2:"prefix"}, ${3:"suffix"} ] ]$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-kinesis-stream
+# key: kinesis-stream
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:kinesisStream}:
+ Type: AWS::Kinesis::Stream
+ Properties:
+ ShardCount: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-launch-config
+# key: launch-config
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:launchConfigName}:
+ Type: AWS::AutoScaling::LaunchConfiguration
+ Properties:
+ IamInstanceProfile: ${2:"--"}
+ ImageId: ${3:"--"}
+ InstanceMonitoring: ${4:"--"}
+ InstanceType: ${5:--}
+ KeyName: ${6:"--"}
+ SecurityGroups:
+ - $0
+ UserData:
+ Fn::Base64:
+ !Join:
+ - ""
+ - "#!/bin/bash -ex"
+ - "${7:-}"
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-logs-loggroup
+# key: logs-loggroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:logLogGroup}:
+ Type: AWS::Logs::LogGroup
+ Properties:
+ RetentionInDays: "${2:7}"
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-logs-metricfilter
+# key: logs-metricfilter
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:logsMetricFilter}:
+ Type: AWS::Logs::MetricFilter
+ Properties:
+ FilterPattern: "[ $2 ]"
+ LogGroupName: $3,
+ MetricTransformations:
+ -
+ $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-map
+# key: map
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:mapName}:
+ ${2:selector}:
+ ${3:key}: ${4:val}
+ ${5:selector}:
+ ${6:key}: ${7:val}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-map-item
+# key: map-item
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:selector}:
+ ${2:key}: ${3:val}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-app
+# key: opsworks-app
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:opsworksApp}:
+ Type: AWS::OpsWorks::App
+ Properties:
+ Name: $2
+ StackId: $3
+ Type: $4
+ AppSource:
+ $5
+ Attributes:
+ $6:$7
+ Description: $8
+ Domains:
+ - $9
+ EnableSsl: ${10:$$(yas-choose-value '("true" "false"))}
+ Shortname: $11
+ SslConfiguration:
+ $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-elasticloadbalancerattachment
+# key: opsworks-elasticloadbalancerattachment
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:opsworksElasticLoadBalancerAttachment}:
+ Type: AWS::OpsWorks::ElasticLoadBalancerAttachment
+ Properties:
+ ElasticLoadBalancerName: $2
+ LayerId: $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-instance
+# key: opsworks-instance
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:opsworksInstance}:
+ Type: AWS::OpsWorks::Instance
+ Properties:
+ InstanceType: $2
+ LayerIds:
+ - $3
+ StackId: $4
+ AmiId: $5
+ Architecture: $6
+ AutoScalingType: $7
+ AvailabilityZone: $8
+ InstallUpdatesOnBoot: ${9:$$(yas-choose-value '("true" "false"))}
+ Os: $10
+ RootDeviceType: $11
+ SshKeyName: $12
+ SubnetId: $13
+ TimeBasedAutoScaling:
+ $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-layer
+# key: opsworks-layer
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:opsworksLayer}:
+ Type: AWS::OpsWorks::Layer
+ Properties:
+ AutoAssignElasticIps: ${2:$$(yas-choose-value '("true" "false"))}
+ AutoAssignPublicIps: ${3:$$(yas-choose-value '("true" "false"))}
+ EnableAutoHealing: ${4:$$(yas-choose-value '("true" "false"))}
+ Name: $5
+ Shortname: $6
+ StackId: $7
+ Type: $8
+ Attributes:
+ $9:$10
+ CustomInstanceProfileArn: $11
+ CustomRecipes: $12
+ CustomSecurityGroupIds:
+ - $13
+ InstallUpdatesOnBoot: ${14:$$(yas-choose-value '("true" "false"))}
+ LoadBasedAutoScaling:
+ $15
+ Packages:
+ - $16
+ VolumeConfigurations:
+ - $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-opsworks-stack
+# key: opsworks-stack
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:opsworksStack}:
+ Type: AWS::OpsWorks::Stack
+ Properties:
+ DefaultInstanceProfileArn: $2
+ Name: $3
+ ServiceRoleArn: $4
+ Attributes:
+ $5:$6
+ ChefConfiguration:
+ $7
+ ConfigurationManager:
+ $8
+ CustomCookbooksSource:
+ $9
+ CustomJson:
+ $10
+ DefaultAvailabilityZone: $11
+ DefaultOs: $12
+ DefaultRootDeviceType: $13
+ DefaultSshKeyName: $14
+ DefaultSubnetId: $15
+ HostnameTheme: $16
+ UseCustomCookbooks: ${17:$$(yas-choose-value '("true" "false"))}
+ UseOpsworksSecurityGroup": ${18:$$(yas-choose-value '("true" "false"))}
+ VpcId: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-output
+# key: output
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:name}:
+ Value: ${2:Value to return}
+ Description: ${3:Information about the value}
+ Export:
+ Name: ${4:Value to export}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-parameter
+# key: parameter
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:paramName}:
+ Description: ${2:-}
+ Type: ${3:$$(yas-choose-value '("String" "Number" "CommaDelimitedList"))}
+ Default: ${4:-}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbinstance
+# key: rds-dbinstance
+# group: cloudformation
+# --
+${1:rdsDBInstance}:
+ Type: AWS::RDS::DBInstance
+ Properties:
+ AllocatedStorage: ${2}
+ DBInstanceClass: ${3}
+ AllowMajorVersionUpgrade: ${4:$$(yas-choose-value '("true" "false"))}
+ AutoMinorVersionUpgrade: ${5:$$(yas-choose-value '("true" "false"))}
+ AvailabilityZone: $6
+ BackupRetentionPeriod: $7
+ CharacterSetName: $8
+ DBInstanceIdentifier: $9
+ DBName: $10
+ DBParameterGroupName: $11
+ DBSecurityGroups:
+ - $12
+ DBSnapshotIdentifier: $13
+ DBSubnetGroupName: $14
+ Engine: $15
+ EngineVersion: $16
+ Iops: $17
+ KmsKeyId: $18
+ LicenseModel: $19
+ MasterUsername: $20
+ MasterUserPassword: $21
+ MultiAZ: ${22:$$(yas-choose-value '("true" "false"))}
+ OptionGroupName: $23
+ Port: $24
+ PreferredBackupWindow: $25
+ PreferredMaintenanceWindow: $26
+ PubliclyAccessible: ${27:$$(yas-choose-value '("true" "false"))}
+ SourceDBInstanceIdentifier: $28
+ StorageEncrypted: ${29:$$(yas-choose-value '("true" "false"))}
+ StorageType: $30
+ Tags:
+ tag$0
+ VPCSecurityGroups:
+ $32
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbparametergroup
+# key: rds-dbparametergroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:rdsDBParameterGroup}:
+ Type: AWS::RDS::DBParameterGroup
+ Properties:
+ Description: $2
+ Family: $3
+ Parameters:
+ - $4
+ Tags:
+ tag$0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbsecuritygroup
+# key: rds-dbsecuritygroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:rdsDBSecurityGroup}:
+ Type: AWS::RDS::DBSecurityGroup
+ Properties:
+ EC2VpcId: $2
+ DBSecurityGroupIngress:
+ $3
+ GroupDescription: $4
+ Tags:
+ tag$0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbsecuritygroupingress
+# key: rds-dbsecuritygroupingress
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+CIDRIP: $1
+DBSecurityGroupName: $2
+EC2SecurityGroupId: $3
+EC2SecurityGroupName: $4
+EC2SecurityGroupOwnerId: $5
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-dbsubnetgroup
+# key: rds-dbsubnetgroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:rdsDBSubnetGroup}:
+ Type: AWS::RDS::DBSubnetGroup
+ Properties:
+ DBSubnetGroupDescription: $2
+ SubnetIds:
+ $3
+ Tags:
+ tag$0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-rds-eventsubscription
+# key: rds-eventsubscription
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:rdsEventSubscription}:
+ Type: AWS::RDS::EventSubscription
+ Properties:
+ Enabled: ${2:$$(yas-choose-value '("true" "false"))}
+ EventCategories:
+ - $3
+ SnsTopicArn: $4
+ SourceIds:
+ - $5
+ SourceType: $6
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-cluster
+# key: redshift-cluster
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:redshiftCluster}:
+ Type: AWS::Redshift::Cluster
+ Properties:
+ AllowVersionUpgrade: ${2:$$(yas-choose-value '("true" "false"))}
+ AutomatedSnapshotRetentionPeriod: $3
+ AvailabilityZone: $4
+ ClusterParameterGroupName: $5
+ ClusterSecurityGroups:
+ $6
+ ClusterSubnetGroupName: $7
+ ClusterType: $8
+ ClusterVersion: $9
+ DBName: $10
+ ElasticIp: $11
+ Encrypted: ${12:$$(yas-choose-value '("true" "false"))}
+ HsmClientCertificateIdentifier: $13
+ HsmConfigurationIdentifier: $14
+ MasterUsername: $15
+ MasterUserPassword: $16
+ NodeType: $17
+ NumberOfNodes: $18
+ OwnerAccount: $19
+ Port: $20
+ PreferredMaintenanceWindow: $21
+ PubliclyAccessible: ${22:$$(yas-choose-value '("true" "false"))}
+ SnapshotClusterIdentifier: $23
+ SnapshotIdentifier: $24
+ VpcSecurityGroupIds:
+ $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-clusterparametergroup
+# key: redshift-clusterparametergroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:redshiftClusterParameterGroup}:
+ Type: AWS::Redshift::ClusterParameterGroup
+ Properties:
+ Description: $2
+ ParameterGroupFamily: $3
+ Parameters:
+ $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-clustersecuritygroup
+# key: redshift-clustersecuritygroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:redshiftClusterSecurityGroup}:
+ Type: AWS::Redshift::ClusterSecurityGroup
+ Properties:
+ Description": $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-clustersecuritygroupingress
+# key: redshift-clustersecuritygroupingress
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:redshiftClusterSecurityGroupIngress}:
+ Type: AWS::Redshift::ClusterSecurityGroupIngress
+ Properties:
+ ClusterSecurityGroupName: $2
+ CIDRIP: $3
+ EC2SecurityGroupName: $4
+ EC2SecurityGroupOwnerId: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-redshift-clustersubnetgroup
+# key: redshift-clustersubnetgroup
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:redshiftClusterSubnetGroup}:
+ Type: "AWS::Redshift::ClusterSubnetGroup",
+ Properties:
+ Description: $2
+ SubnetIds:
+ $3
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-ref
+# key: ref
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+!Ref: ${1:logicalName}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-resource
+# key: resource
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:resourceName}:
+ Description: ${2:-}
+ Type: ${3:-}
+ Properties: ${4:-}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route
+# key: route
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:routeName}:
+ Type: AWS::EC2::Route
+ Properties:
+ RouteTableId: ${2:"--"}
+ DesinationCidrBlock: ${3:"--"}
+ GatewayId: ${4:"--"}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route-table
+# key: route-table
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:routeTableName}:
+ Type: AWS::EC2::RouteTable
+ Properties:
+ VpcId: ${2:"--"}
+ Tags:
+ - ${3:"--"}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route-table-assoc
+# key: route-table-assoc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:routeTableAssocName"}:
+ Type: AWS::EC2::SubnetRouteTableAssociation
+ Properties:
+ SubnetId: ${2:"--"},
+ RouteTableId: ${3:"--"}
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-healthcheck
+# key: route53-healthcheck
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:route53HealthCheck}:
+ Type: AWS::Route53::HealthCheck
+ Properties:
+ HealthCheckConfig: $2
+ HealthCheckTags: $3
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-hostedzone
+# key: route53-hostedzone
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+$1:
+ Type: AWS::Route53::HostedZone
+ Properties:
+ Name: $2
+ VPCs: $3
+ HostedZoneConfig: $4
+ HostedZoneTags:
+ - $5
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-recordset
+# key: route53-recordset
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:route53RS}:
+ Type: AWS::Route53::RecordSet
+ Properties:
+ Name: $2
+ Type: ${3:$$(yas-choose-value '("A" "AAAA" "CNAME" "MX" "NS" "PTR" "SOA" "SPF" "SRV" "TXT"))}
+ AliasTarget: $4
+ Comment: $5
+ Failover: $6
+ GeoLocation: $7
+ HealthCheckId: $8
+ HostedZoneId: $9
+ HostedZoneName: $10
+ Region: $11
+ ResourceRecords:
+ - $12
+ SetIdentifier: $13
+ TTL: $14
+ Weight: $15
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-route53-recordset-group
+# key: route53-recordset-group
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:route53RSGroup}:
+ Type: AWS::Route53::RecordSetGroup
+ Properties:
+ HostedZoneId: $2
+ HostedZoneName: $3
+ RecordSets:
+ - {$4}
+ Comment: $5
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-s3-bucket
+# key: s3-bucket
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:s3Bucket}:
+ Type: AWS::S3::Bucket
+ Properties:
+ AccessControl: ${2:$$(yas-choose-value '("true" "false" "Private" "PublicRead" "PublicReadWrite" "AuthenticatedRead" "LogDeliveryWrite" "BucketOwnerRead" "BucketOwnerFullControl"))}
+ BucketName: $3
+ CorsConfiguration: $4
+ LifecycleConfiguration: $5
+ NotificationConfiguration: $6
+ VersioningConfiguration: $7
+ WebsiteConfiguration: $8
+ Tags:
+ tag$0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-s3-bucketpolicy
+# key: s3-bucketpolicy
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:s3BucketPolicy}:
+ Type: AWS::S3::BucketPolicy
+ Properties:
+ Bucket : $2
+ PolicyDocument:
+ - $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-security-group
+# key: security-group
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:secGroupName}:
+ Type: AWS::EC2::SecurityGroup
+ Properties:
+ GroupName: ${2:-}
+ GroupDescription: ${3:-}
+ SecurityGroupIngress:
+ - ${4:--insert rules--}
+ VpcId: ${5:ref-to-vpc}
+ Tags:
+ $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-securitygroup-rule
+# key: sg-rule
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+Description: "$1"
+IpProtocol: "${2:$$(yas-choose-value '("tcp" "udp" "icmp" "-1"))}"
+FromPort: $3
+ToPort: $4
+${5:$$(yas-choose-value '("SourceSecurityGroupId" "DestinationSecurityGroupId" "CidrIp" "CidrIpv6" "DestinationPrefixListId"))}: "$6"$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-select-list
+# key: select-list
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+!Select: [ ${1:$$(yas-choose-value '("0" "1" "etc"))}, {"Ref": "${2:list_name}"} ] }$0
\ No newline at end of file
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sg-egress-cidr
+# key: security-group-egress-cidr
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+IpProtocol: ${1:$$(yas-choose-value '("tcp" "udp" "ip"))}
+FromPort: ${2:-}
+ToPort: ${3:-}
+CidrIp: ${4:-}
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sg-ingress-cidr
+# key: security-group-ingress
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+IpProtocol: ${1:$$(yas-choose-value '("tcp" "udp" "ip"))}
+FromPort: ${2:-}
+ToPort: ${3:-}
+CidrIp: ${4:-}
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sns-topic
+# key: sns-topic
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:snsTopic}:
+ Type: AWS::SNS::Topic
+ Properties:
+ DisplayName: $2
+ Subscription:
+ $3
+ TopicName: $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sns-topicpolicy
+# key: sns-topicpolicy
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:snsTopicPolicy}:
+ Type: AWS::SNS::TopicPolicy
+ Properties:
+ PolicyDocument: $2
+ Topics: $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sqs-queue
+# key: sqs-queue
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:sqsQueue}:
+ Type: AWS::SQS::Queue
+ Properties:
+ DelaySeconds: $2
+ MaximumMessageSize: $3
+ MessageRetentionPeriod: $4
+ QueueName: $5
+ ReceiveMessageWaitTimeSeconds: $6
+ RedrivePolicy:
+ - $7
+ VisibilityTimeout: $0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-sqs-queuepolicy
+# key: sqs-queuepolicy
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:sqsQueuePolicy}:
+ Type: AWS::SQS::QueuePolicy
+ Properties:
+ PolicyDocument:
+ - $2
+ Queues:
+ $0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-start
+# key: start
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+AWSTemplateFormatVersion: "2010-09-09"
+Description: ${1}
+
+Metadata:
+
+Parameters:
+
+Mappings:
+
+Conditions:
+
+Resources:
+
+Outputs:
+$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-subnet
+# key: subnet
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:subnetName}:
+ Type: AWS::EC2::Subnet
+ Properties:
+ AvailabilityZone: ${2:"-"}
+ VpcId: ${3:"-"}
+ CidrBlock: ${4:"-"}
+ Tags:
+ tag$0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-tag
+# key: tag
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+-
+ Key: "${1:-}"
+ Value: ${2:"--"}$0
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-vpc
+# key: vpc
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:name}:
+ Type: AWS::EC2::VPC
+ Properties:
+ CidrBlock: ${2:"----/--"}
+ Tags:
+ tag$0
+
--- /dev/null
+# -*- mode: snippet -*-
+# name: aws-vpn-gateway
+# key: vpn-gateway
+# group: cloudformation
+# expand-env: ((yas/indent-line 'auto) (yas/wrap-around-region 't))
+# --
+${1:vgwName}:
+ Type: AWS::EC2::VPNGateway
+ Properties:
+ Type: ipsec.1
+ Tags:
+${2:AttachVpnGateway}:
+ Type: AWS::EC2::VPCGatewayAttachment
+ Properties:
+ VpcId: ${3:"--"}
+ VpnGatewayId:
+ Ref: $1
+$0
--- /dev/null
+A collection of yasnippet snippets to be used with AWS CLI as well as JSON for CloudFormation