# Program conversion
<gh-file:pulumi#proto/pulumi/converter.proto>

## Services

(pulumirpc.Converter)=
### 🔌 Converter
Converter is a service for converting between other ecosystems and Pulumi.
This is currently unstable and experimental.


(pulumirpc.Converter.ConvertState)=
#### 📞 ConvertState

⤵️ [ConvertStateRequest](#pulumirpc.ConvertStateRequest) ⤴️ [ConvertStateResponse](#pulumirpc.ConvertStateResponse)

ConvertState converts state from the target ecosystem into a form that can be imported into Pulumi.


(pulumirpc.Converter.ConvertProgram)=
#### 📞 ConvertProgram

⤵️ [ConvertProgramRequest](#pulumirpc.ConvertProgramRequest) ⤴️ [ConvertProgramResponse](#pulumirpc.ConvertProgramResponse)

ConvertProgram converts a program from the target ecosystem into a form that can be used with Pulumi.

## Messages
(pulumirpc.ConvertProgramRequest)=
### 📨 ConvertProgramRequest



`source_directory` [string](#string)
:   the source directory containing the program to convert from.


`target_directory` [string](#string)
:   a target directory to write the resulting PCL code and project file to.


`mapper_target` [string](#string)
:   the gRPC target of the mapper service.


`loader_target` [string](#string)
:   The target of a codegen.LoaderServer to use for loading schemas.


`args` [string](#string)
:   the args passed to `pulumi convert` for this conversion. Normally used to specifiy a root file, or conversion options.


`generated_project_directory` [string](#string)
:   the directory where the final generated project for the eventual destination language will be written.
  use to determine relative paths of any asset that will be copied over.
  Do not write files to this directory as these files might be overwritten in 
  the project generation process.

(pulumirpc.ConvertProgramResponse)=
### 📨 ConvertProgramResponse



`diagnostics` [codegen.Diagnostic](#pulumirpc.codegen.Diagnostic)
:   any diagnostics from code generation.

(pulumirpc.ConvertStateRequest)=
### 📨 ConvertStateRequest



`mapper_target` [string](#string)
:   the gRPC target of the mapper service.


`args` [string](#string)
:   the args passed to `pulumi import` for this conversion. Normally used to specifiy a state file to
  import from.

(pulumirpc.ConvertStateResponse)=
### 📨 ConvertStateResponse



`resources` [ResourceImport](#pulumirpc.ResourceImport)
:   a list of resources to import.


`diagnostics` [codegen.Diagnostic](#pulumirpc.codegen.Diagnostic)
:   any diagnostics from state conversion.

(pulumirpc.ResourceImport)=
### 📨 ResourceImport
A ResourceImport specifies a resource to import.


`type` [string](#string)
:   the type token for the resource.


`name` [string](#string)
:   the name of the resource.


`id` [string](#string)
:   the ID of the resource.


`version` [string](#string)
:   the provider version to use for the resource, if any.


`pluginDownloadURL` [string](#string)
:   the provider PluginDownloadURL to use for the resource, if any.


`logical_name` [string](#string)
:   the logical name of the resource.


`is_component` [bool](#bool)
:   true if this is a component resource.


`is_remote` [bool](#bool)
:   true if this is a remote resource. Ignored if is_component is false.

