Conversion mappings#

pulumi/pulumi:proto/pulumi/codegen/mapper.proto

Services#

๐Ÿ”Œ Mapper#

Mapper provides methods for retrieving mappings that describe how to map names in some source โ€œproviderโ€ (e.g. a Terraform provider, if we are converting from Terraform) to names in appropriate Pulumi packages. So when converting a Terraform program containing code like resource "aws_s3_bucket" "b" {}, for instance, we need to know (among other things) that the aws_s3_bucket Terraform resource type corresponds to the Pulumi type aws:s3/bucket:Bucket, and thus lives in the aws package. This is the kind of information that a Mapper provides.

๐Ÿ“ž GetMapping#

โคต๏ธ GetMappingRequest โคด๏ธ GetMappingResponse

GetMapping returns any available mapping data for the given source provider name (so again, this is e.g. the name of a Terraform provider if converting from Terraform). Callers may pass โ€œhintsโ€ that describe a Pulumi package that is expected to provide the mapping and satisfy the request, which implementations may use to optimise their efforts to return the best possible mapping. If no matching mapping exists, implementations should return an empty byte array result.

Messages#

๐Ÿ“จ GetMappingRequest#

GetMappingRequest is the type of requests sent as part of a ๐Ÿ“ž GetMapping call.

provider string

The name of the source provider (e.g. the Terraform provider name if a Terraform program is being converted) for which a mapping into Pulumi should be returned.

pulumi_provider string

The name of the Pulumi plugin that is expected to provide the mapping. If left empty, will be defaulted to the source provider name.

parameterization_hint MapperParameterizationHint

An optional parameterization that should be used on the named plugin before asking it for mappings.

๐Ÿ“จ GetMappingResponse#

GetMappingResponse is the type of responses sent by ๐Ÿ“ž GetMapping calls.

data bytes

Conversion-plugin-specific mapping data. For a Terraform conversion, for instance, this is expected to be a piece of data that maps Terraform names (e.g. resource types) to Pulumi names (e.g. Pulumi resource types). In many cases this byte array will be a string of encoded JSON, but no specific format is required.

๐Ÿ“จ MapperParameterizationHint#

MapperPackageParameterizationHint is the type of hints that may be passed to ๐Ÿ“ž GetMapping when it is expected that a parameterized provider plugin is the most likely source of a mapping. E.g. in the case of a dynamically bridged Terraform provider, callers may wish to express that a mapping is most likely offered by the โ€œterraform-providerโ€ plugin, but only when it is parameterized with the appropriate Terraform provider information.

name string

The package name expected once parameterization has been applied.

version string

The package version expected once parameterization has been applied.

value bytes

The parameter value to send to the provider plugin as part of parameterization.