brabster / crucible

AWS CloudFormation templates built with Clojure
Eclipse Public License 1.0
72 stars 18 forks source link

Use function instead of string or xref #112

Closed keerts closed 6 years ago

keerts commented 6 years ago

Is there any other way to do the equivalent of:

  {:file-store-bucket (s3/bucket {::s3/bucket-name (cf/join [{:ref "AWS::StackName"} "-rfj-files"])})}

The spec allows either a string or an xref.

brabster commented 6 years ago

Hi @keerts, is the problem referencing the pseudo-parameter "AWS::StackName"?

If so, there's some vars in the core namespace to help out, stack-name is core/stack-name https://github.com/brabster/crucible/blob/333e2a2e673d24cf8af83cecc8466b28f4bab549/src/crucible/core.clj#L125 - but it's not documented, so I should add something.

If I've misunderstood, could you explain more what you're having problems with?

keerts commented 6 years ago

That's exactly what I was looking for! Thanks for the quick reply.

For future reference:

{:file-store-bucket (s3/bucket {::s3/bucket-name (cf/join [cf/stack-name "-files"])})}