]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
Use cfn_nag_scan and cfn-lint for AWS Cloudformation json templates.
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 11 Jan 2019 15:55:19 +0000 (16:55 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 11 Jan 2019 15:55:19 +0000 (16:55 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index 8d72cb4560b2b010ef9f2fc9202b102e3a69a3c9..a3f35182b0334a949034733cd8757648660f5ed8 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -4329,6 +4329,33 @@ Use aws command line tool via Emacs.
 
 #+END_SRC
 
+Check a AWS Cloudformation template with [[https://github.com/stelligent/cfn_nag][cfn_nag]]:
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+  (defun bba-aws-cfn-nag-scan()
+    "Check buffer with cfn_nag_scan."
+    (interactive)
+    (shell-command (concat "cfn_nag_scan --input-path " buffer-file-name)))
+  (define-key json-mode-map (kbd "C-c C-n") 'bba-aws-cfn-nag-scan)
+#+END_SRC
+
+Check a AWS Cloudformation template with [[https://github.com/awslabs/cfn-python-lint][cfn-lint]]:
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+  (defun bba-aws-cfn-lint()
+    "Check buffer with cfn_lint."
+    (interactive)
+    (shell-command (concat "cfn-lint " buffer-file-name)))
+  (define-key json-mode-map (kbd "C-c C-l") 'bba-aws-cfn-lint)
+#+END_SRC
+
+
+* terraform
+[2016-09-02 Fri 14:57]
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+  (add-hook 'terraform-mode-hook #'terraform-format-on-save-mode)
+#+END_SRC
 * thing-at-point-fqdn
 [2016-02-12 Fri 14:13]