pulumi / pulumi-yaml

YAML language provider for Pulumi
Apache License 2.0
38 stars 11 forks source link

Support running YAML in type checking mode, outside `pulumi preview` #575

Open AaronFriel opened 2 months ago

AaronFriel commented 2 months ago

It's not currently possible to type check a Pulumi YAML program without running pulumi preview, and unfortunately, many providers do not work with preview in an offline capacity, and will error if not given real credentials to a cloud account.

Contrast this with all other supported languages, in which we users can use the compiler/runtime tools to check the program: tsc for TypeScript, mypy and pyright for Python, ...

Perhaps a subcommand on the main binary to run in checking mode could meet this need:

$ pulumi-language-yaml check ./dir/Pulumi.yaml

Due to provider limitations above, this is a pre-requisite for verifying Pulumi AI Answers written in YAML. This would also be useful for generating verified Pulumi AI Answers in multiple languages (via YAML, then pulumi convert) or generating templates and components for multiple languages, whether with AI or otherwise, as we can use this to verify the program and iterate before using it with pulumi convert, pulumi preview, or otherwise.