Do not import non-existing inputs or outputs in Node.js codegen
Do not import non-existing inputs or outputs in Node.js codegen
@@ -878,9 +878,9 @@ func (mod *modContext) configGetter(v *schema.Property) (string, string) {
func (mod *modContext) genConfig(w io.Writer, variables []*schema.Property) error {
imports := map[string]codegen.StringSet{}
- mod.getImports(variables, imports)
+ referencesNestedTypes := mod.getImports(variables, imports)
- mod.genHeader(w, mod.sdkImports(true, true), imports)
+ mod.genHeader(w, mod.sdkImports(referencesNestedTypes, true), imports)
// Create a config bag for the variables to pull from.
fmt.Fprintf(w, "let __config = new pulumi.Config(\"%v\");\n", mod.pkg.Name)
