-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
troposphere 3.0 - futures #1558
Comments
I would also consider using the CloudFormation Repository instead of the resource specification. I'd also consider using the json booleans as a default instead of the 'true' and 'false' strings, so the output can be validated with cfn-lint and doesn't throw errors with both tools in their default configuration. |
Thanks @ikben. Can you provide a link to the CloudFormation Repository? Not sure I know that one. Agreed on your other point:
|
Documentation link: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html For troposphere the interesting part is the type schema. You can develop your own, but the schema of all AWS resources is also available via the API: https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html or download publicly accessible versions: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-type-schemas.html This is also the schema that is used for third party resources in AWS Config: https://aws.amazon.com/about-aws/whats-new/2019/11/aws-config-launches-support-third-party-resources/ I'd expect there would be more data that can be parsed from the registry than from the current schema. |
I would also suggest generating type annotations. Perhaps this is implied in the better intellisense support objective, but I think it's a worthy goal on its own for the growing mypy user community. |
Hi @markpeek I have experienced in using code to generate code from AWS official Cloudformation documentation source @ns-cweber Actually I had a personal project troposphere_mate-project that generate type hint from the troposphere source code, and enables property name hint, type hint. The idea is simple. Just use jinja2 template and use I think I can do the same things that automatically generates code from aws docs. I can help with this part. For "Restructure in a way to allow intellisense to work with properties to make coding easier", I have a lot of ideas and implemented in troposphere_mate-project, such as:
Is there anyone you feel like could benefit the developer in productivity or maintainability? Thank you |
Disclaimer: I'm a complete noob regarding trophosphere and InGraph, I just stumbled across this issue after playing around with both while attempting to re-build existing AWS infrastructure. Maybe it's worth taking a look at InGraph for the generation of Objects based on the AWS specs? -> https://github.com/lifadev/ingraph-aws Another thing that stuck out from playing around with InGraph was the use of Cidr for creating multiple subnet ranges for a VPC. In troposphere you more or less mirror the CF syntax in Python by using the Select and Cidr functions, in InGraph it's more 'pythonic' and can be accessed as a Python list that also 'hides' the use of Select.
|
Validators like Most property validators could be shared between multiple projects: Would focusing validators in |
I'd say the scope mentioned in the initial comment it to big. Why not target Python 3.6+ only with Troposphere 3.0. And then try to do as many of the other items in 3.1, 3.2, …
I haven't looked at the resource specs. But since no effort in this direction was successful so far, maybe it's better to start with generating some code from the specs and then go from there.
It's probably possible to support both names. The old ones should be properly deprecated and removed in Troposphere 4.0. Dropping support for Python 2 in Troposphere would also make it easier to drop support for Python 2 in awacs. And it would make it easier for people to run the tests locally (no need to ensure that 2to3 was called). |
Wanted to start an issue to discuss goals for troposphere 3.0:
Implications:
The text was updated successfully, but these errors were encountered: