Skip to content
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

Consider supporting --convert-examples via plugin-run #180

Open
guineveresaenger opened this issue Jul 24, 2024 · 0 comments
Open

Consider supporting --convert-examples via plugin-run #180

guineveresaenger opened this issue Jul 24, 2024 · 0 comments
Labels
kind/enhancement Improvements or new features

Comments

@guineveresaenger
Copy link

guineveresaenger commented Jul 24, 2024

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Currently, --convert-examples is a bit of a hack to enable bulk conversion of bridged provider examples. I was told this could be more fully supported via plugin-run

Core details

plugin run is a new currently experimental command that allows the engine to directly invoke a plugin binary to run it as a standalone exe.
--convert-examples is an arg to the terraform converter that makes it ignore the input from the engine when calling ConvertProject and instead does a bulk conversion of the file specified on the argument. We added it to the converter this way because conversion depends on the mapper service from the engine to do the conversion, and currently the only way to get hold of the mapper service is in ConvertProject.

We could expose engine services, like the mapper (or schema loading, or other things we add) to standalone plugin runs somehow. If we did that we could change the converter to do bulk conversion just via something like pulumi plugin run --kind converter terraform -- --convert-examples=file.json. UX call this isn't much different to the current pulumi convert terraform -- --convert-examples=file.json but it will make a lot more sense code wise when looking at how the converter code works.

Affected area/feature

--convert-examples flag

@guineveresaenger guineveresaenger added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Jul 24, 2024
@justinvp justinvp removed the needs-triage Needs attention from the triage team label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants