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

Add Eject function to use from "pulumi convert" #630

Merged
merged 1 commit into from Nov 4, 2022
Merged

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Oct 28, 2022

No description provided.

@@ -74,7 +74,7 @@ func TestConvert(t *testing.T) {
import * as pulumi from "@pulumi/pulumi";

const config = new pulumi.Config();
const regionNumber = config.get("regionNumber") || {
const regionNumber = config.getObject("regionNumber") || {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this must be because the tf11 code generator used get, but tf12 uses getObject. It's probably a safe change but I haven't dug into or thought too hard about it.

@github-actions
Copy link

Diff for pulumi-random with merge commit 7647572

@github-actions
Copy link

Diff for pulumi-azuread with merge commit 7647572

@github-actions
Copy link

Diff for pulumi-gcp with merge commit 7647572

@github-actions
Copy link

Diff for pulumi-azure with merge commit 7647572

@github-actions
Copy link

Diff for pulumi-aws with merge commit 7647572

@github-actions
Copy link

Diff for pulumi-random with merge commit a500512

@github-actions
Copy link

Diff for pulumi-azuread with merge commit a500512

@github-actions
Copy link

Diff for pulumi-gcp with merge commit a500512

@github-actions
Copy link

Diff for pulumi-azure with merge commit a500512

@github-actions
Copy link

Diff for pulumi-aws with merge commit a500512

@Frassle Frassle changed the title Addd Eject function to use from "pulumi convert" Add Eject function to use from "pulumi convert" Oct 28, 2022
@Frassle
Copy link
Member Author

Frassle commented Oct 29, 2022

Pondering on this idea some more, I wonder if using pulumi to host tfconvert is the right order to do things. I wonder if instead we should add something to the automation api to flip this around such that tfconvert uses the automation api to get an engine interface to make plugin schema and codegen requests from. That still solves the coupling issue (codegen and schema fetching done via a stable grpc interface, and plugin loading and execution totally internal to the engine) but it's less flipping around the execution order of things, and also might be what we need for the yaml-lsp as well.

@Frassle Frassle requested a review from iwahbe November 3, 2022 09:03
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like a refactor like this should try to preserve existing tests, but I leave this one up to your discretion.

Your idea of using the automation API to have tf2pulumi invoke the engine to get access to RPC is interesting. I think in this case, it makes sense to launch tf2pulumi via pulumi convert, just because I think we want pulumi convert --language lang --out out to be as universal as possible.

The LSP sever will need a different mechanism, your suggestion makes a lot of sense there.

@Frassle
Copy link
Member Author

Frassle commented Nov 4, 2022

I feel like a refactor like this should try to preserve existing tests, but I leave this one up to your discretion.

I'm hoping to get rid of all the language specific tests over the next few weeks anyway, so I'll commit this with the intention we're going to loop back heavily over testing soon.

@Frassle Frassle merged commit 330791e into master Nov 4, 2022
@Frassle Frassle deleted the fraser/eject branch November 4, 2022 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants