You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR is just a suggestion - it wasn't very clear to me what
"parameterization" means in the context of dynamic providers. It felt
like it was referring to a very specific concept, but it didn't really
go into what that was. It feels like we could wait to talk about it
until we do have that doc and concept laid out.
Feel free to ignore - these would've been my comments on #2137.
The dynamic provider layer is by-design as simple and straight-forward as possible. Each package does one
131
-
thing only and there isn't that much code. As of time of writing, the entire `dynamic` folder is only 2288
132
-
lines of go code[^1]. I'll go through each package in turn.
126
+
The dynamic provider layer consists bydesign of small, specialized packages.
127
+
As of time of writing, the entire `dynamic` folder is only 2288 lines of go code[^1].
128
+
Let's go through each package in turn.
133
129
134
130
[^1]: `loc --exclude '*._test.go'`
135
131
136
132
### `package main`
137
133
138
134
`package main` is responsible for launching a Pulumi provider and setting up the parameterize call. It does
139
-
this by calling [`pf/tfbridge.Main`](https://pkg.go.dev/github.com/pulumi/pulumi-terraform-bridge/[email protected]/tfbridge#Main), passing in an empty PF provider (from
135
+
this by calling [`pf/tfbridge.Main`](https://pkg.go.dev/github.com/pulumi/pulumi-terraform-bridge/[email protected]/tfbridge#Main), passing in an empty Terraform Plugin Framework provider (from
140
136
[`pf/proto.Empty()`](https://pkg.go.dev/github.com/pulumi/pulumi-terraform-bridge/[email protected]/proto#Empty)). [`pf/tfbridge.ProviderMetadata`](https://pkg.go.dev/github.com/pulumi/pulumi-terraform-bridge/[email protected]/tfbridge#ProviderMetadata) allows overriding the `Parameterize` and
141
137
`GetSchema` call (and we override both).
142
138
@@ -146,7 +142,7 @@ functions return a [`tfprotov6.ProviderServer`](https://pkg.go.dev/github.com/ha
When `GetSchema` is called, it generates a schema from the currently equipped provider with
149
-
[`pkg/tfgen.GenerateSchemaWithOptions`](https://pkg.go.dev/github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen#GenerateSchemaWithOptions) and returns is. All type translation, documentation generation, etc
145
+
[`pkg/tfgen.GenerateSchemaWithOptions`](https://pkg.go.dev/github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen#GenerateSchemaWithOptions) and returns it. All type translation, documentation generation, etc
150
146
are done with standard bridge based functionality.
151
147
152
148
All other gRPC calls (`Create`, `Read`, `Update`, `Delete`, etc.) are handled normally by `pf`'s existing
0 commit comments