Link java and yaml programgen into import
@@ -31,12 +31,8 @@ import (
"github.com/pulumi/pulumi/pkg/v3/backend"
"github.com/pulumi/pulumi/pkg/v3/backend/display"
- "github.com/pulumi/pulumi/pkg/v3/codegen/dotnet"
- gogen "github.com/pulumi/pulumi/pkg/v3/codegen/go"
"github.com/pulumi/pulumi/pkg/v3/codegen/importer"
- "github.com/pulumi/pulumi/pkg/v3/codegen/nodejs"
"github.com/pulumi/pulumi/pkg/v3/codegen/pcl"
- "github.com/pulumi/pulumi/pkg/v3/codegen/python"
"github.com/pulumi/pulumi/pkg/v3/codegen/schema"
"github.com/pulumi/pulumi/pkg/v3/engine"
"github.com/pulumi/pulumi/pkg/v3/resource/deploy"
@@ -47,6 +43,13 @@ import (
"github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/result"
+
+ javagen "github.com/pulumi/pulumi-java/pkg/codegen/java"
+ yamlgen "github.com/pulumi/pulumi-yaml/pkg/pulumiyaml/codegen"
+ "github.com/pulumi/pulumi/pkg/v3/codegen/dotnet"
+ gogen "github.com/pulumi/pulumi/pkg/v3/codegen/go"
+ "github.com/pulumi/pulumi/pkg/v3/codegen/nodejs"
+ "github.com/pulumi/pulumi/pkg/v3/codegen/python"
)
func parseResourceSpec(spec string) (string, resource.URN, error) {
@@ -460,6 +463,10 @@ func newImportCmd() *cobra.Command {
programGenerator = nodejs.GenerateProgram
case "python":
programGenerator = python.GenerateProgram
+ case "java":
+ programGenerator = javagen.GenerateProgram
+ case "yaml":
+ programGenerator = yamlgen.GenerateProgram
default:
return result.Errorf("cannot generate resource definitions for %v", proj.Runtime.Name())
}
