Skip to content

Commit 472fcce

Browse files
authored
Expose methods for MakeTerraformInputsWithOptions (#3179)
Exposing MakeTerraformInputsWithOptions so that we can consume this in the pulumi-service. This will allow us to perform server side conversions into terraform formats that can be used in upcoming integrations. See pulumi/pulumi-service#33261 This PR exposes the following methods for use by an internal dependency: ## Exported Function - MakeTerraformInputsWithoutDefaults - Creates Terraform inputs from Pulumi property maps explicitly disabling default values ## Important Notes ⚠️ These APIs are exported only to satisfy an internal dependency. External users should NOT rely on them as they may change or be removed in future versions without notice.
1 parent ac30239 commit 472fcce

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkg/tfbridge/schema.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,19 @@ func MakeTerraformInputs(
342342
return makeTerraformInputsWithOptions(ctx, instance, config, olds, news, tfs, ps, makeTerraformInputsOptions{})
343343
}
344344

345+
// MakeTerraformInputsWithoutDefaults creates Terraform inputs from Pulumi property maps without default values.
346+
//
347+
// WARNING: This function is exported only to satisfy an internal dependency and external
348+
// users should NOT rely on it. The API may change or be removed in future versions
349+
// without notice.
350+
func MakeTerraformInputsWithoutDefaults(
351+
ctx context.Context, instance *PulumiResource, config resource.PropertyMap,
352+
olds, news resource.PropertyMap, tfs shim.SchemaMap, ps map[string]*SchemaInfo,
353+
) (map[string]interface{}, AssetTable, error) {
354+
return makeTerraformInputsWithOptions(ctx, instance, config, olds, news, tfs, ps,
355+
makeTerraformInputsOptions{DisableDefaults: true, DisableTFDefaults: true})
356+
}
357+
345358
// makeTerraformInput takes a single property plus custom schema info and does whatever is necessary
346359
// to prepare it for use by Terraform. Note that this function may have side effects, for instance
347360
// if it is necessary to spill an asset to disk in order to create a name out of it. Please take

0 commit comments

Comments
 (0)