-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC 77, RFC 264: CloudFormation Registry Imports #266
Conversation
These are two distinct RFCs for two distinct features, but we might as well work on the docs at the same time. Hence, one PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great RFCs! Let's definitely have a discussion as part of these two RFCs around whether we want to continue to vend CFN resources as part of the AWS construct library or just use them as an implementation detail.
|
||
### README | ||
|
||
The AWS Construct Library ships with CloudFormation resources and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think that once we have e this capability, in 3.x we will stop exporting CFN resource publicly
deploy via CloudFormation. These include: | ||
|
||
- Applications from the Serverless Application Repository | ||
- Applications from the AWS Service Catalog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they are called Products
# ...or don't pass anything to import all available products | ||
$ cdk import servicecatalog | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to simply discover the type of import:
- Company::Group::Type for cfn registry
- SAR arn
- Service catalog arn
|
||
If you want to update to the latest version of the definition, you can run the same | ||
`cdk import` command again. It will show you the changes to the the resource, before | ||
asking you to confirm to overwrite the existing source files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice touch
asking you to confirm to overwrite the existing source files. | ||
|
||
If you happen to be working in Java, C#, Python or Go, `cdk import` will build a | ||
jsii bundle from the generated sources and automatically generate the corresponding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "jsii bundle" part is an non interesting detail in this readme. Just write it will generate source files in your language
|
||
The CloudFormation Registry allows publishing new resource types to user's | ||
accounts. Consuming it as an information source is the only way to add CDK | ||
support for resources published privately to the CloudFormation registry (see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And publicly (like Datadog)
* Min/max array lengths | ||
* Whether an array represents a set or sequence | ||
* Properties that must be specified together (`dependencies`). | ||
* Permissions required for the CRUD operations of resources (`permissions`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. TIL
* What properties are used to hold secrets/passwords/etc (`writeOnlyProperties`). | ||
* Deprecated properties (`deprecatedProperties`). | ||
|
||
There are things that customers are now able to specify that will pose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Customers=>resource vendors
|
||
The SAM specification has been hand-written to mimic the old CloudFormation | ||
specification, but with extensions. This specification is not maintained | ||
by CloudFormation and hence is not being converted to JSON schema by them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I remember SAM is also published as a json schema
resource developers and they can prevent themselves from accidentally | ||
releasing breaking changes (reducing churn on downstream systems). | ||
* A tool to generate code the type and resource definitions found | ||
in the schema. This can mostly be based on `json2jsii`, although we will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's definitely try to bake as much of the capabilities into Json2jsii so we get the most leverage for other CDKs (and jsii-based projects).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make sure to take the recently launched CloudFormation modules into the cdk import
feature. I'd like to be able to do something like cdk import MyCompany::S3::Bucket::MODULE
FYI, this is now being implemented and published under cdklabs/cdk-import. @rix0rrr I am wondering if it's worth leaving this RFC open or we can merge it for now and continue iterating on the code? |
These are two distinct RFCs for two distinct features, but we might as
well work on the docs at the same time. Hence, one PR.
Tracking issue: CloudFormation Registry Support #77 - importing external resources
Rendered version
Tracking issue: Generating L1s from CloudFormation Registry Schema Format #264 - codegen off the new registry schema
Rendered version
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache-2.0 license