Comments (7)
Hi @ryanwilliams83 thanks for the suggestion! I think it should be pretty easy to support.
The stack class does have the 'transform' property on it that you need to use to say that this template should be transformed: AWSTemplateFormatVersion: '2010-09-09'
https://github.com/jakejscott/Humidifier/blob/master/src/Humidifier/Stack.cs#L21
Then I think it's a matter of implementing the resource types from the spec here:
https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md
Also the the event source types:
https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#event-source-types
I think the types should go in a directory called /src/Humidifier/Serverless
If you give me a couple days I can implement it for you.
from humidifier.
I also want to provide some sample projects, so I will add one for SAM first.
I'm also planning on creating a dotnet cli tooling similar to this:
https://github.com/aws/aws-extensions-for-dotnet-cli#aws-lambda-amazonlambdatools
from humidifier.
To make the framework extensible I added the AWSTypeName property to the Resource class.
I was then able to inherit from Humudifier.Resource in my own namespace and create my own representations of the Serverless objects.
This pull request includes the changes to the Generator, the JSON Serializer and the Resource class only.
It fails the automated tests because it doesn't include all of the generated code files.
#8
from humidifier.
Do you want to make all the classes implement the AWSTypeName so that it builds?
I think I'm happy with your approach. I've been wondering about how to make it extensible so nice work!
from humidifier.
@ryanwilliams83 I've just pushed a new 0.2.5 version of the library.
I also added a stub for implementing the rest of the serverlss resource types: https://github.com/jakejscott/Humidifier/blob/master/src/Humidifier/Serverless/Function.cs
Thanks for the contribution :)
from humidifier.
@jakejscott Would it be possible for you to fully support the SAM model as defined by AWS? E.g. all types.
from humidifier.
What's missing? I added some more properties to this class a while back but just manually....
I found out that there is some JSON that describes the serverless cloudformation specs here:
https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/cfnspec/spec-source/000_sam.spec.json
But I just haven't had time to implement it as I don't use the Serverless transforms stuff and prefer to use the underlying resources directly (as Serverless templates just get expanded out in Cloudformation).
Feel free to let me know what's missing, or a PR and I can take a look.
Cheers
from humidifier.
Related Issues (12)
- Add support for DependsOn for resources HOT 1
- Support for AWS::CloudFormation::Interface HOT 5
- Incomplete attributes for some resources. HOT 7
- VPCEndpoint object has an incorrectly capitalized property HOT 3
- AWS CDK HOT 1
- Add support for resource attributes (Creation Policy, Update Policy, Delete Policy) HOT 2
- Add support for Condition in IAM Role statements HOT 3
- Add Path and Policies to PolicyDocument helper class
- PolicyDocumentBuilder
- Strong typing instead dynamic HOT 1
- Feature Request: Validate template for tags HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from humidifier.