Program conversion#

pulumi/pulumi:proto/pulumi/converter.proto

Services#

🔌 Converter#

Converter is a service for converting between other ecosystems and Pulumi. This is currently unstable and experimental.

📞 ConvertState#

⤵️ ConvertStateRequest ⤴️ ConvertStateResponse

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

📞 ConvertProgram#

⤵️ ConvertProgramRequest ⤴️ ConvertProgramResponse

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

📞 ConvertSnippet#

⤵️ ConvertSnippetRequest ⤴️ ConvertSnippetResponse

ConvertSnippet generates a single PCL file from a single source file in the target ecosystem. It is used when callers need to convert a small source fragment, such as an input file, rather than a full Pulumi program.

Messages#

📨 ConvertProgramRequest#

source_directory string

the source directory containing the program to convert from.

target_directory string

a target directory to write the resulting PCL code and project file to.

mapper_target string

the gRPC target of the mapper service.

loader_target string

The target of a codegen.LoaderServer to use for loading schemas.

args string

the args passed to pulumi convert for this conversion. Normally used to specifiy a root file, or conversion options.

generated_project_directory 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.

📨 ConvertProgramResponse#

diagnostics codegen.Diagnostic

any diagnostics from code generation.

📨 ConvertSnippetRequest#

filename string

The name of the source file. This is used for diagnostics.

source bytes

The raw bytes of the source file.

target_loader string

The target of a codegen.LoaderServer to use for loading schemas.

package codegen.GetSchemaRequest

The package description to load which contains the token.

token string

The token to use when converting the snippet. This may be a provider token, such as pulumi:providers:pkg, a function token, or a resource token.

attributes ConvertSnippetRequest.AttributesEntry

any extra attributes to convert.

resources ConvertSnippetRequest.ResourcesEntry

any external resource references to convert.

📨 AttributesEntry#

key string

<No description>

value string

<No description>

📨 ResourceReference#

token string

The resource token for the referenced resource.

package codegen.GetSchemaRequest

The package description to load for the referenced resource.

📨 ResourcesEntry#

key string

<No description>

value ConvertSnippetRequest.ResourceReference

<No description>

📨 ConvertSnippetResponse#

diagnostics codegen.Diagnostic

Any diagnostics raised by code generation.

filename string

The generated PCL filename.

source bytes

The generated PCL source code.

attributes ConvertSnippetResponse.AttributesEntry

any extra attributes to merge into the final pcl result.

resource_names ConvertSnippetResponse.ResourceNamesEntry

any external resource names that were rewritten during conversion. The keys are identifiers in the source language and the values are identifiers in the generated PCL.

📨 AttributesEntry#

key string

<No description>

value string

<No description>

📨 ResourceNamesEntry#

key string

<No description>

value string

<No description>

📨 ConvertStateRequest#

mapper_target string

the gRPC target of the mapper service.

args string

the args passed to pulumi import for this conversion. Normally used to specifiy a state file to import from.

loader_target string

The target of a codegen.LoaderServer to use for loading schemas.

resolver_target string

The target of a 🔌 PackageResolver service the converter can use to resolve package specifications to concrete package dependencies. May be empty on older engines.

📨 ConvertStateResponse#

resources ResourceImport

a list of resources to import.

diagnostics codegen.Diagnostic

any diagnostics from state conversion.

📨 ResourceExtension#

A ResourceExtension describes an extension parameterization to apply to a resource’s (base) provider.

name string

the name of the extension package.

version string

the version of the extension package.

value bytes

the parameter value for the extension.

📨 ResourceImport#

A ResourceImport specifies a resource to import.

type string

the type token for the resource.

name string

the name of the resource.

id string

the ID of the resource.

version string

the provider version to use for the resource, if any.

pluginDownloadURL string

the provider PluginDownloadURL to use for the resource, if any.

logical_name string

the logical name of the resource.

is_component bool

true if this is a component resource.

is_remote bool

true if this is a remote resource. Ignored if is_component is false.

parameterization ResourceParameterization

the replacement parameterization to use for the resource’s provider, if any. Set when the resource should be imported under a parameterized (e.g. dynamically bridged) provider rather than a plain one.

extension ResourceExtension

the extension parameterization to apply to the resource’s provider, if any. Unlike a replacement parameterization, the resource’s own type is in the base provider’s package; the extension is a blob applied on top of that provider. Mutually exclusive with parameterization.

parent string

the name of the resource’s parent, if any. Must reference the name of another resource in the same response; resources without a parent are parented to the stack root.

properties string

the input properties to include when generating code for the resource. Defaults to the resource’s required properties.

provider string

the name of the resource’s explicit provider, if any. Must reference the name of a provider declared as another resource (of type “pulumi:providers:”) in the same response; resources without a provider are served by an appropriate default provider.

inputs google.protobuf.Struct

input properties supplied for the resource, if any. Values the provider’s Read cannot return (e.g. write-only attributes) are taken from here instead. For a provider declared in the response, inputs is its configuration. Secret values are marked with Pulumi’s standard secret signature.

outputs google.protobuf.Struct

the resource’s full output state, if any. When set, the resource is imported from these values directly and the provider’s Read is skipped entirely. Secret values are marked with Pulumi’s standard secret signature.

📨 ResourceParameterization#

A ResourceParameterization describes the base plugin that a resource’s parameterized provider is built from. The parameterized package name and version are taken from the resource’s own type and version.

plugin_name string

the name of the base plugin to parameterize (e.g. “terraform-provider”).

plugin_version string

the version of the base plugin to parameterize.

value bytes

the parameter value to apply to the base plugin.