Happy to announce a new version of the <Cookiecutt...
# package-authoring
b
Happy to announce a new version of the Cookiecutter Template for setting up a repository to wrap a Terraform Provider into a Pulumi provider. Aside some bug fixes the most two notably changes are the support for selecting the resources mapping and naming strategies: The resource mapping strategy specifies how resources and data sources from the upstream Terraform provider are mapped. The template supports two modes: •
automatic
(default) The template will emit code to utilize the auto discovery mechanism of Pulumi Terraform Bridge to map resources and data sources. It is still possible to manually map resources and data sources with special configurations. • `manual`: all resources and data sources must be manually added as with before The resource naming strategy configures the way how to create a Pulumi name from a Terraform resource or data source name and what part of the Terraform name become a part of the Pulumi module and what part becomes the actual name of the Pulumi object. The template supports three modes: •
singlelevel
(default): all resources and data sources will be mapped one level deep into a namespace extracted along the underscores in the Terraform name Terraform name: dbtcloud_environment_variable_job_override Module: environment Name: VariableJobOverride • `structured`: resources will be placed in namespaces along the underscores in the Terraform name Terraform name: dbtcloud_environment_variable_job_override Module: environment/variable/job Name: Override • `flat`: all resources will be placed in the top-level (nameless) root module Terraform name: dbtcloud_environment_variable_job_override Module: empty Name: EnvironmentVariableJobOverride When
singlelevel
or
structured
is selected, the template emits a dictionary
module_overrides
in
resources.go
which can be used to map a generated module name to a different module name. Happy wrapping! @ancient-policeman-24615 @enough-garden-22763 @limited-rainbow-51650 @delightful-salesclerk-16161 #contribute #pulumiverse #announcements