Writing CloudFormation template in Rust

Short Question: Is there an example of how to write a CloudFormation template in Rust?

Long Question:

I am interested in redoing all my AWS Configs in CloudFormation, so that they are 100% declarative and can be committed into git.

I am not a particular fan of the json format Cloudformation (seems very error prone). I am wondering if it is powerful to use Rust's type system to write CloudFormation specs (where compiling / running a rust program generates a CloudFormation Spec).

Googling, I have found rusoto_cloudformation - Rust but I'm not sure if it is what I want (or even howto create a simple CloudFormation spec from it).

Assuming the above package does what I want, is there a simple tutorial (or even better a cookbook) of writing CloudFormation in Rust?

Thanks!

I'm not aware of any CloudFormation specific generators in Rust. AWS has a new one for Go. Perhaps that could be used as inspiration.

The rusoto_cloudformation crate is for interacting with the AWS service. For example, it could be used to deploy the generated templates from another tool, such as goformation or troposphere. It doesn't generate templates for you, though.

Hope this helps! :smile: