Skip to content

v1.10.4

Choose a tag to compare

@ulucinar ulucinar released this 13 Jul 09:31
f5d9149

This patch release backports a feature to fix a category of bugs in the providers to the release-1.10 branch that lets upjet-based providers override the controller setup aggregator and resource.Terraformed templates. It unblocks providers from resolving a categorical bug involving a map in status.atProvider by supplying their own terraformed template.

Features

  • Custom controller setup aggregator & terraformed templates (#696, backport of #693): Adds the config.WithSetupAggregatorTemplate and config.WithTerraformedTemplate ProviderOptions, mirroring the existing config.WithMainTemplate and WithControllerTemplate options. These let a provider override the controller setup aggregator (setup.go.tmpl) and the managed-resource terraformed (terraformed.go.tmpl) templates used during code generation. The change is backward-compatible: when a provider does not set these options, upjet's built-in default templates are used. Note that a provider adopting these APIs takes over ownership of the corresponding template and becomes responsible for keeping it in sync with future upjet changes. New documentation for both templates and their variables was added under docs/.

  • New Terraform.ResourceSchema terraformed template variable: The terraformed template now exposes the full Terraform Plugin SDK v2 resource schema (*github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.Resource) as Terraform.ResourceSchema, replacing the previous Terraform.SchemaVersion (int) variable. The default template reads {{ .Terraform.ResourceSchema.SchemaVersion }} to implement GetTerraformSchemaVersion, while a custom terraformed template can read any other exported field of the schema.

What's Changed

  • [Backport release-1.10] Allow Custom Controller Setup Aggregator & Terraformed Templates via config.Provider by @ulucinar in #696

Full Changelog: v1.10.3...v1.10.4