I don't know much about CF templates, but stripping some detail from your 
middle fragment moves further from data and to a DSL:

(deftemplate my-template
  :aws-template-format-version "2010-09-09"
  :description "My description"
  
  (param my-parameter :type :string :description "My string parameter")
  
  (mapping my-mapping
           :first-level-key-one {:second-level-key-one "Value"}
           :first-level-key-two {:second-level-key-two "Another Value"})
  
  (condition my-condition (not my-parameter))
  (condition my-second-condition (= (-> my-mapping :first-level-key-one 
:second-level-key-one) my-parameter))
  
  (resource my-instance aws.ec2/instance :image-id "ami-79fd7eee")
  
  (output my-first-output (:instance-type my-instance))
  (output my-second-output my-parameter))

Craig


On Tuesday, November 26, 2013 3:41:29 PM UTC+11, Kevin Bell wrote:
>
> Hey folks, I'm working on a tool to enable the generation of AWS 
> CloudFormation templates using a Clojure-based syntax kind of like 
> leiningen's project.clj. I'm working on how the syntax should look to be 
> most clojurey, and I wonder if anyone has some input: 
> https://gist.github.com/bellkev/7653342<https://www.google.com/url?q=https%3A%2F%2Fgist.github.com%2Fbellkev%2F7653342&sa=D&sntz=1&usg=AFQjCNF5RUFgHxpojQ1x0EPxJFQ09ibA3A>
>
> I should add that I'm very new to Clojure and using this project as an 
> opportunity to learn more about the language internals. So please forgive 
> any particularly non-idiomatic Clojure...
>
> Thanks!!
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to