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.
providerstringThe 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_providerstringThe name of the Pulumi plugin that is expected to provide the mapping. If left empty, will be defaulted to the source provider name.
parameterization_hintMapperParameterizationHintAn 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.
databytesConversion-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.