Open benley opened 8 years ago
Ah, thank you, that's very interesting!
Hmm, the vstoolkit schema does not seem to be current:
$ cat CloudFormationV1.schema | jq -r '."root-schema-object".properties.Resources."child-schemas" | keys[]' | wc -l
138
$ cat resource.json | jq -r '.definitions.resource_types | keys[]' | wc -l
155
I'm comparing the number or resource types mentioned in the CloudFormationV1.schema versus the schema in this repo.
All of those with +
sign are missing from CloudFormationV1.schema
$ diff -u1 <(cat CloudFormationV1.schema | jq -r '."root-schema-object".properties.Resources."child-schemas" | keys[]' | sort) <(cat resource.json | jq -r '.definitions.resource_types | keys[]' | sort)
--- /dev/fd/63 2016-08-05 23:00:19.676113950 +0200
+++ /dev/fd/62 2016-08-05 23:00:19.680113817 +0200
@@ -1 +1,12 @@
+AWS::ApiGateway::Account
+AWS::ApiGateway::ApiKey
+AWS::ApiGateway::Authorizer
+AWS::ApiGateway::BasePathMapping
+AWS::ApiGateway::ClientCertificate
+AWS::ApiGateway::Deployment
+AWS::ApiGateway::Method
+AWS::ApiGateway::Model
+AWS::ApiGateway::Resource
+AWS::ApiGateway::RestApi
+AWS::ApiGateway::Stage
AWS::AutoScaling::AutoScalingGroup
@@ -5,4 +16,6 @@
AWS::AutoScaling::ScheduledAction
-AWS::AutoScaling::Trigger
+AWS::CloudFormation::Authentication
AWS::CloudFormation::CustomResource
+AWS::CloudFormation::Init
+AWS::CloudFormation::Interface
AWS::CloudFormation::Stack
@@ -29,2 +42,3 @@
AWS::EC2::EIPAssociation
+AWS::EC2::Host
AWS::EC2::Instance
@@ -78,2 +92,3 @@
AWS::EMR::Step
+AWS::Events::Rule
AWS::GameLift::Alias
@@ -135,4 +150,6 @@
AWS::WAF::Rule
+AWS::WAF::SizeConstraintSet
AWS::WAF::SqlInjectionMatchSet
AWS::WAF::WebACL
+AWS::WAF::XssMatchSet
AWS::WorkSpaces::Workspace
That's disappointing, but I guess not all that surprising. Amazon themselves have recommended using that schema as a reference, but I guess they don't keep it up to date.
Some related issues on this topic:
https://github.com/stevenjack/cfndsl/issues/75 https://github.com/stevenjack/cfndsl/issues/49 https://github.com/aws/aws-toolkit-eclipse/issues/14 https://github.com/aws/aws-toolkit-eclipse/issues/40
Thanks for the links! There's a lot more happening around cloudformation schemas than I thought!
It would be really great if we had a single source of truth. for all these projects? @cdandekar are you able to weigh in on this thread?
There some development on this at https://github.com/stevenjack/cfndsl/issues/264
This isn't in the jsonschema format that you're after, but are you aware of the cloudformation schema that AWS provides for Eclipse?
http://vstoolkit.amazonwebservices.com/CloudFormationSchema/CloudFormationV1.schema
Seems like it might be useful as a data source.