bright / cloudform

TypeScript-based imperative way to define AWS CloudFormation templates
MIT License
153 stars 27 forks source link

SAM support #24

Open minheq opened 5 years ago

minheq commented 5 years ago

SAM is a a useful abstraction layer on top of Cloudformation by AWS https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html

It does not appear that cloudform has support for this. IMO it would be beneficiary for cloudform to include it, WDYT?

NOtherDev commented 5 years ago

Definitely, it would make sense. It seems that SAM is a bit different in terms of root level structure and apart of that is a superset of CloudFormation resources. Do I get it right?

It seems that there is a machine-readable schema file available on GitHub. Can you have a look if it makes sense to use it to generate cloudform types?

matthewkeil commented 5 years ago

That is the correct schema file that you have there. I find myself very used to using cloudform, thanks!! by the way, and im doing a SAM project. i would love to help but i looked at the code and its over my head. will take a long time for me to spin up but will be happy to help if i can

matthewkeil commented 4 years ago

I see why you aren't able to make this happen easily now (learning every day). I still use this package daily and advocate for it to whomever i speak with so it about time for me to put up or shut up with the love of open source. I see that the spec is in a github repo not in the json you pull from CF. Would it be acceptable for me to write a helper function that pulls the gihub readme or the macine-readable-schema they are using as the spec and parsing that to turn it into the format that generator.ts is expecting. that way the build process can just pull the readme, run the transcriber and append the result to the json that comes back from the CF resource query. Will be a bit of work and want to double check this approach will be ok with you, @azabost @miensol @polemius, before i begin.

Thanks, @matthewkeil