Protobuf and gRPC interfaces

Protobuf and gRPC interfaces#

This package contains Protobuf definitions for the various types, messages and interfaces that Pulumi components use to communicate. These definitions serve as the source of truth for several parts of the wider codebase.

Code generation#

Note

Code generated from Protobuf files is committed to the repository. If you change one or more .proto files, you should run make build_proto to regenerate the necessary stubs and commit the changes as part of the same piece of work.

The pulumi/pulumi:proto/generate.sh script in this directory (called by the build_proto target in the top-level pulumi/pulumi:Makefile) generates types and gRPC clients for the languages supported in this repository (Go, NodeJS/TypeScript and Python). Generated code is committed to the repository, typically in proto directories at the relevant use sites (e.g. pulumi/pulumi:sdk/nodejs/proto).

Documentation#

We use the protoc-gen-doc plugin to protoc to generate Markdown documentation from the Protobuf files. This process is handled by the pulumi/pulumi:docs/Makefile in the docs directory and uses the pulumi/pulumi:docs/references/proto.md.tmpl template. Generated documentation ends up in the docs/_generated directory (which is .gitignored), so e.g. this index links to files in this folder.

Index#