common

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package common holds resource configuration helpers shared by the cluster-scoped and the namespaced configurators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmbedSingleNestedBlocks

func EmbedSingleNestedBlocks(r *config.Resource, tfPaths ...string)

EmbedSingleNestedBlocks embeds the given plugin-framework single-nested blocks as objects without a singleton list conversion. Terraform exchanges a single-nested block as an object, while the SingletonListEmbedder treats every MaxItems=1 list as a singleton list to convert at runtime, which would break the state round trip for these blocks.

func MarkSingleNestedBlockConfigurable

func MarkSingleNestedBlockConfigurable(r *config.Resource, tfPath string, optional bool)

MarkSingleNestedBlockConfigurable clears the Computed flag that upjet's tfjson conversion infers for every plugin-framework single-nested block with at least one required descendant. Without it, such a block is generated only under status.atProvider. The conversion also marks the block required, so pass optional for a block that upstream treats as optional. tfPath may be a dotted path into a nested block, e.g. "list_block.single_block"; only the final segment's flags are changed.

Safe only for a plugin framework resource: for a plugin SDK resource, TerraformResource is the live schema its controller uses for real CRUD, and mutating it here would corrupt that client.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL