Language hosts#
pulumi/pulumi:proto/pulumi/language.proto
Services#
π LanguageRuntime#
The LanguageRuntime service defines a standard interface for language hosts/runtimes. At a high level, a language runtime provides the ability to execute programs, install and query dependencies, and generate code for a specific language.
π Handshake#
β€΅οΈ LanguageHandshakeRequest β€΄οΈ LanguageHandshakeResponse
Handshake is the first call made by the engine to a language host. It is used to pass the engineβs address to
the language host so that it may establish its own connections back, and to establish protocol configuration that
will be used to communicate between the two parties.
π GetRequiredPlugins#
β€΅οΈ GetRequiredPluginsRequest β€΄οΈ GetRequiredPluginsResponse
GetRequiredPlugins computes the complete set of anticipated plugins required by a Pulumi program.
Among other things, it is intended to be used to pre-install plugins before running a program with
π Run, to avoid the need to install them on-demand in response to resource
registrations sent back from the running program to the engine.
Important
The use of GetRequiredPlugins is deprecated in favour of π GetRequiredPackages,
which returns more granular information about which plugins are required by which packages.
π GetRequiredPackages#
β€΅οΈ GetRequiredPackagesRequest β€΄οΈ GetRequiredPackagesResponse
GetRequiredPackages computes the complete set of anticipated packages required
by a program. It is used to pre-install packages before running a program with π Run,
to avoid the need to install them on-demand in response to resource registrations sent
back from the running program to the engine. Moreover, when importing resources into a stack, it is used to
determine which plugins are required to service the import of a given resource, since given the presence of
parameterized providers, it is not in general true that a package name corresponds 1:1
with a plugin name. It replaces π GetRequiredPlugins in the face of parameterized
providers, which as mentioned above can enable multiple instances of the same plugin to
provide multiple packages.
π Run#
β€΅οΈ RunRequest β€΄οΈ RunResponse
Run executes a Pulumi program, returning information about whether or not the program produced an error.
π GetPluginInfo#
β€΅οΈ .google.protobuf.Empty β€΄οΈ PluginInfo
GetPluginInfo returns information about the plugin implementing this language runtime.
π InstallDependencies#
β€΅οΈ InstallDependenciesRequest β€΄οΈ InstallDependenciesResponse
InstallDependencies accepts a request specifying a Pulumi project and program that can be executed with
π Run and installs the dependencies for that program (e.g. by running npm install
for NodeJS, or pip install for Python). Since dependency installation could take a while, and callers may wish
to report on its progress, this method returns a stream of π¨ InstallDependenciesResponse messages
containing information about standard error and output.
π RuntimeOptionsPrompts#
β€΅οΈ RuntimeOptionsRequest β€΄οΈ RuntimeOptionsResponse
RuntimeOptionsPrompts accepts a request specifying a Pulumi project and returns a list of additional prompts to
ask during pulumi new.
π Template#
β€΅οΈ TemplateRequest β€΄οΈ TemplateResponse
Template allows the language runtime to perform additional templating on a newly instantiated project template.
For example the Python runtime might want to convert a requirements.txt into a pyproject.toml suitable for use
with uv or poetry.
π About#
β€΅οΈ AboutRequest β€΄οΈ AboutResponse
About returns information about the language runtime being used.
π GetProgramDependencies#
β€΅οΈ GetProgramDependenciesRequest β€΄οΈ GetProgramDependenciesResponse
GetProgramDependencies computes the set of language-level dependencies (e.g. NPM packages for NodeJS, or Maven
libraries for Java) required by a program.
π RunPlugin#
β€΅οΈ RunPluginRequest β€΄οΈ RunPluginResponse
RunPlugin is used to execute a program written in this hostβs language that implements a Pulumi
plugin. It is to plugins what π Run is to programs. Since a plugin is not
expected to terminate until instructed/for a long time, this method returns a stream of
π¨ RunPluginResponse messages containing information about standard error and output, as well as the
exit code of the plugin when it does terminate.
π GenerateProgram#
β€΅οΈ GenerateProgramRequest β€΄οΈ GenerateProgramResponse
GenerateProgram generates code in this hostβs language that implements the given PCL program. Unlike
π GenerateProject, this method only generates program code, and does not e.g.
generate a package.json for a NodeJS project that details how to run that code.
π GenerateProject, this method underpins βprogramgenβ and the main
functionality powering pulumi convert.
π GenerateProject#
β€΅οΈ GenerateProjectRequest β€΄οΈ GenerateProjectResponse
GenerateProject generates code in this hostβs language that implements the given PCL program and wraps
it in some language-specific notion of a βprojectβ, where a project is a buildable or runnable artifact. In this
sense, GenerateProjectβs output is a superset of that of π GenerateProgram. For
instance, when generating a NodeJS project, this method might generate a corresponding package.json file, as
well as the relevant NodeJS program code. Along with π GenerateProgram, this method
underpins βprogramgenβ and the main functionality powering pulumi convert.
π GeneratePackage#
β€΅οΈ GeneratePackageRequest β€΄οΈ GeneratePackageResponse
GeneratePackage generates code in this hostβs language that implements an SDK (βsdkgenβ) for the
given Pulumi package, as specified by a schema.
π Pack#
β€΅οΈ PackRequest β€΄οΈ PackResponse
Pack accepts a request specifying a generated SDK package and packs it into a language-specific artifact. For
instance, in the case of Java, it might produce a JAR file from a list of .java sources; in the case of NodeJS,
a .tgz file might be produced from a list of .js sources; and so on. Presently, Pack is primarily used in
language conformance tests, though it is intended to be used more widely in future
to standardise e.g. provider publishing workflows.
π Link#
β€΅οΈ LinkRequest β€΄οΈ LinkResponse
Link links local dependencies into a project (program or plugin). The dependencies can be binary artifacts such
as wheel or tar.gz files, or source directories. Link will update the language specific project files, such as
package.json, pyproject.toml, go.mod, etc, to include the dependency. Link returns instructions for the
user on how to use the linked package in the project.
π Cancel#
β€΅οΈ .google.protobuf.Empty β€΄οΈ .google.protobuf.Empty
Cancel signals the language runtime to gracefully shut down and abort any ongoing operations.
Operations aborted in this way will return an error.
Messages#
π¨ AboutRequest#
AboutRequest is the type of requests sent as part of an π About call.
infoProgramInfoThe program to use.
π¨ AboutResponse#
AboutResponse is the type of responses sent by an π About call. It contains information
about the language runtime being used.
executablestringThe primary executable for the runtime of this language. This should be an absolute path. E.g. for NodeJS on a POSIX system, this might be something like
/usr/bin/node.versionstringThe version of the runtime underpinning the language host. E.g. for a NodeJS host, this might be the version of
nodebeing used.metadataAboutResponse.MetadataEntryOther host-specific metadata about the runtime underpinning the language host.
π¨ MetadataEntry#
π¨ DependencyInfo#
DependencyInfo is a struct that captures information about a language-specific dependency required by a program
(e.g. an NPM package for NodeJS, or a Maven library for Java). It is returned as part of a
pulumirpc.LanguageRuntime.GetProgramDependenciesResponse.
π¨ GeneratePackageRequest#
GeneratePackageRequest is the type of requests sent as part of a π GeneratePackage call.
directorystringThe directory to generate the package in. This should be an absolute path on the filesystem that is accessible to the language host.
schemastringA JSON-encoded string containing the schema from which the SDK package should be generated.
extra_filesGeneratePackageRequest.ExtraFilesEntryExtra files that should be copied as-is to the generated output.
loader_targetstringThe target of a codegen.LoaderServer to use for loading schemas.
local_dependenciesGeneratePackageRequest.LocalDependenciesEntryLocal dependencies that the generated package should reference explicitly, instead of e.g. using the languageβs package system. This is a map of package names to local paths of language-specific artifacts that should be used. For instance, in the case of a NodeJS package, this might be a map of NPM package names to local paths to be used, such as
{ "@pulumi/aws": "/some/path/to/aws.tgz" }if a local tarball is to be used instead of the published@pulumi/awspackage.localboolIf true, generates an SDK appropriate for local usage. This may differ from a standard publishable SDK depending on the language (e.g. for a NodeJS package that is intended to be imported locally, the language host may choose not to generate a
package.json).
π¨ ExtraFilesEntry#
π¨ LocalDependenciesEntry#
π¨ GeneratePackageResponse#
GeneratePackageResponse is the type of responses sent by a π GeneratePackage call.
diagnosticscodegen.DiagnosticAny diagnostics raised by code generation.
π¨ GenerateProgramRequest#
GenerateProgramRequest is the type of requests sent as part of a π GenerateProgram
call.
sourceGenerateProgramRequest.SourceEntryThe source of the project, represented as a map of file names to PCL source code.
loader_targetstringThe target of a codegen.LoaderServer to use for loading schemas.
strictboolTrue if PCL binding should be strict.
π¨ SourceEntry#
π¨ GenerateProgramResponse#
GenerateProgramResponse is the type of responses sent by a π GenerateProgram call.
diagnosticscodegen.DiagnosticAny diagnostics raised by code generation.
sourceGenerateProgramResponse.SourceEntryThe generated program source code, represented as a map of file names to byte contents.
π¨ SourceEntry#
π¨ GenerateProjectRequest#
GenerateProjectRequest is the type of requests sent as part of a π GenerateProject call.
source_directorystringThe directory containing PCL source code, from which the project should be generated.
target_directorystringThe directory in which generated project files should be written. This should be an absolute path on the filesystem that is accessible to the language host.
projectstringA string containing JSON to be used as the Pulumi project file (that is, as the contents of
Pulumi.yaml).strictboolTrue if PCL binding should be strict.
loader_targetstringThe target of a codegen.LoaderServer to use for loading schemas.
local_dependenciesGenerateProjectRequest.LocalDependenciesEntryLocal dependencies that the generated project should reference explicitly, instead of e.g. using the languageβs package system. This is a map of package names to local paths of language-specific artifacts that should be used. For instance, in the case of a NodeJS project, this might be a map of NPM package names to local paths to be used, such as
{ "@pulumi/aws": "/some/path/to/aws.tgz" }if a local tarball is to be used instead of the published@pulumi/awspackage.
π¨ LocalDependenciesEntry#
π¨ GenerateProjectResponse#
GenerateProjectResponse is the type of responses sent by a π GenerateProject call.
diagnosticscodegen.DiagnosticAny diagnostics raised by code generation.
π¨ GetProgramDependenciesRequest#
GetProgramDependenciesRequest is the type of requests sent as part of a
π GetProgramDependencies call.
projectstringThe project name.
Important
This is deprecated in favour of passing a program info struct as the
infofield. Newer versions of the engine will always set this field to the string"deprecated".pwdstringThe programβs working directory.
Important
This is deprecated in favour of passing a program info struct as the
infofield, with theprogram_directoryfield set to this value.programstringThe path to the program.
Important
This is deprecated in favour of passing a program info struct as the
infofield, with theentry_pointfield set to this value.transitiveDependenciesboolTrue if transitive dependencies should be included in the response.
infoProgramInfoThe program to use.
π¨ GetProgramDependenciesResponse#
GetProgramDependenciesResponse is the type of responses sent by a
π GetProgramDependencies call. It contains information about the dependencies of a
program.
dependenciesDependencyInfoThe dependencies of the program specified by the request.
π¨ GetRequiredPackagesRequest#
GetRequiredPackagesRequest is the type of requests sent as part of a
π GetRequiredPackages call.
infoProgramInfoThe program to use.
π¨ GetRequiredPackagesResponse#
GetRequiredPackagesResponse is the type of responses sent by a π GetRequiredPackages
call. It contains information about the packages required by a program.
packagesPackageDependencyThe packages required by the program specified by the request.
π¨ GetRequiredPluginsRequest#
GetRequiredPluginsRequest is the type of requests sent as part of a
π GetRequiredPlugins call.
projectstringThe project name.
Important
This is deprecated in favour of passing a program info struct as the
infofield. Newer versions of the engine will always set this field to the string"deprecated".pwdstringThe programβs working directory.
Important
This is deprecated in favour of passing a program info struct as the
infofield, with theprogram_directoryfield set to this value.programstringThe path to the program.
Important
This is deprecated in favour of passing a program info struct as the
infofield, with theentry_pointfield set to this value.infoProgramInfoThe program to use.
π¨ GetRequiredPluginsResponse#
GetRequiredPluginsResponse is the type of responses sent by a π GetRequiredPlugins
call. It contains information about the plugins required by a program.
pluginsPluginDependencyThe plugins required by the program specified by the request.
π¨ InstallDependenciesRequest#
InstallDependenciesRequest is the type of requests sent as part of an
π InstallDependencies call.
directorystringThe programβs working directory.
Important
This is deprecated in favour of passing a program info struct as the
infofield, with theprogram_directoryfield set to this value.is_terminalboolTrue if we are running in a terminal and may use ANSI escape codes in our output.
infoProgramInfoThe program to use.
use_language_version_toolsboolTrue if the host should use language-specific version managers, such as
pyenvornvm, to set up the version of the language toolchain used.is_pluginboolTrue if this install is for a plugin, as opposed to a top level Pulumi program.
π¨ InstallDependenciesResponse#
InstallDependenciesResponse is the type of responses streamed by an
π InstallDependencies call.
π¨ LanguageHandshakeRequest#
LanguageHandshakeRequest is the type of requests sent as part of a π Handshake call.
engine_addressstringThe gRPC address of the engine calling the language host.
root_directorystringThe optional root directory, where the
PulumiPlugin.yamlfile or language binary is located. This canβt be sent when the engine is attaching to a language via a port number.program_directorystringThe optional absolute path to the directory of the language program to execute. Generally, but not required to be, underneath the root directory. This canβt be sent when the engine is attaching to a language via a port number.
π¨ LanguageHandshakeResponse#
LanguageHandshakeResponse is the type of responses sent by a π Handshake call.
π¨ LinkRequest#
LinkRequest is the type of requests sent as part of a π Link call.
infoProgramInfoThe program to use.
loader_targetstringThe target of a codegen.LoaderServer to use for loading schemas.
packagesLinkRequest.LinkDependencyLocal dependencies that should be linked into the program or pluginβs language specific project files. Each dependency has a path to a language specific artifact. This can be a binary artifact like a Python wheel or a tar.gz for Node.js, or a source directory.
π¨ LinkDependency#
packagePackageDependency<No description>
pathstring<No description>
π¨ LinkResponse#
LinkResponse is the type of responses sent by a π Link call.
import_instructionsstringThe instructions on how to use a linked package in a program or plugin. These instructions are meant to be displayed to the user. For example when linking a local Python dependency, this might return
import my_namespace_mypkg as mypkg.
π¨ PackRequest#
PackRequest is the type of requests sent as part of a π Pack call.
package_directorystringThe directory containing the package to pack. This should be an absolute path on the filesystem that is accessible to the language host.
destination_directorystringThe directory to write the packed artifact to. This should be an absolute path on the filesystem that is accessible to the language host.
π¨ PackResponse#
PackResponse is the type of responses sent by a π Pack call.
artifact_pathstringThe path to the packed artifact. This should be an absolute path on the filesystem that is accessible to the language host.
π¨ ProgramInfo#
A ProgramInfo struct specifies a Pulumi program, and is built typically based on the location of a Pulumi.yaml
file and the runtime, main and other properties within that file.
root_directorystringThe root of the project containing the program, where the
Pulumi.yamlfile is located. This should be an absolute path on the filesystem that is accessible to the language host.program_directorystringThe directory containing the program to execute (e.g. the location of the
index.tsfor a TypeScript NodeJS program). This should be an absolute path on the filesystem that is accessible to the language host. IfProgramInfois being built from aPulumi.yaml, this will typically be the directory portion of themainproperty in that file.entry_pointstringThe entry point of the program to execute. This should be a relative path from the
program_directory, and is often just.to indicate the program directory itself, but it can also be a filename inside the directory.. IfProgramInfois being built from aPulumi.yaml, this will typically be the filename specifiedmainproperty in that file if it is present, or the aforementioned.if not.optionsgoogle.protobuf.StructA struct capturing any language-specific options. If
ProgramInfois being built from aPulumi.yaml, this will contain theruntime.optionsproperty from that file.
π¨ RunPluginRequest#
RunPluginRequest is the type of requests sent as part of a π RunPlugin call.
pwdstringThe plugin programβs working directory.
programstringThe path to the plugin program.
Important
This is deprecated in favour of passing a program info struct as the
infofield, with theentry_pointfield set to this value.argsstringAny arguments to pass to the plugin program.
envstringAny environment variables to set prior to executing the plugin program.
infoProgramInfoThe plugin program to use.
kindstringThe kind of plugin to run (resource/analyzer/etc).
namestringThe name of the plugin (for display purposes)
attach_debuggerboolTrue if a plugin should be started under a debugger.
loader_targetstringThe target of a codegen.LoaderServer to use for loading schemas.
π¨ RunPluginResponse#
RunPluginResponse is the type of responses streamed by a π RunPlugin call.
π¨ RunRequest#
RunRequest is the type of requests sent as part of a π Run call.
projectstringThe project name.
stackstringThe name of the stack being deployed into.
pwdstringThe programβs working directory.
programstringThe path to the program.
Important
This is deprecated in favour of passing a program info struct as the
infofield, with theentry_pointfield set to this value.argsstringAny arguments to pass to the program.
configRunRequest.ConfigEntryConfiguration variables to apply before running the program.
dryRunboolTrue if we are only doing a dry run (preview).
parallelint32The degree of parallelism that should be used for resource operations. A value less than or equal to 1 indicates serial execution.
monitor_addressstringThe address of the π ResourceMonitor that the program should connect to send resource registrations and other calls to.
queryModeboolThis is deprecated, query mode is no longer a supported feature.
configSecretKeysstringA list of configuration keys whose values should be treated as secrets.
organizationstringThe organization of the stack being deployed into.
configPropertyMapgoogle.protobuf.StructThis is deprecated, runtimes should look at the string based config as that maintains the full textual data from the users config file.
infoProgramInfoThe program to use.
loader_targetstringThe target of a codegen.LoaderServer to use for loading schemas.
attach_debuggerboolTrue if and only if the host should start the program under a debugger.
π¨ ConfigEntry#
π¨ RunResponse#
RunResponse is the type of responses sent by a π Run call.
errorstringInformation about any unhandled error that occurred during the run.
bailboolTrue if an error happened, but it was reported to the user. Work should halt immediately, reporting nothing further to the user (since this reporting has already happened). This corresponds to a
result.Bail()value being raised in the Go application layer.
π¨ RuntimeOptionPrompt#
RuntimeOptionPrompt is a struct that captures information about a runtime option that should be prompted for during
pulumi new.
keystringA unique key that identifies the runtime option.
descriptionstringA human-readable description of the runtime option.
promptTypeRuntimeOptionPrompt.RuntimeOptionTypeThe type of the runtime option.
choicesRuntimeOptionPrompt.RuntimeOptionValueA set of choices for the runtime option that may be displayed as part of the prompting process.
defaultRuntimeOptionPrompt.RuntimeOptionValueThe default value of the runtime option.
π¨ RuntimeOptionValue#
RuntimeOptionValue is a struct that captures the value of a runtime option.
promptTypeRuntimeOptionPrompt.RuntimeOptionTypeThe type of the runtime option.
stringValuestringThe string value of the runtime option, if and only if the type is
STRING.int32Valueint32The 32-bit integer value of the runtime option, if and only if the type is
INT32.displayNamestringThe display name of the runtime option, to be used in prompts.
π¨ RuntimeOptionsRequest#
RuntimeOptionsRequest is the type of requests sent as part of a π RuntimeOptionsPrompts
call.
infoProgramInfoThe program to use.
π¨ RuntimeOptionsResponse#
RuntimeOptionsResponse is the type of responses sent by a π RuntimeOptionsPrompts call.
It contains information about additional prompts to ask during pulumi new.
promptsRuntimeOptionPromptPrompts to ask the user.
π¨ TemplateRequest#
TemplateRequest is the type of requests sent as part of a π Template call.
infoProgramInfoThe plugin program to use.
project_namestringThe name of the project we are templating.
π¨ TemplateResponse#
TemplateResponse is the type of responses sent by a π Template call.