resourceutil

package
v1.46.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDStringValue

func IDStringValue(value int) types.String

func LabelsMapValueFrom

func LabelsMapValueFrom(ctx context.Context, in map[string]string) (types.Map, diag.Diagnostics)

LabelsMapValueFrom prepare the labels from the API to be assigned into the resource model.

In the resource schemas, labels can be null, but the API always returns an empty object for labels. This causes a conflict in the Terraform Data Consistency check. This method handles empty label objects by instead returning a null map.

func LabelsSchema

func LabelsSchema() schema.MapAttribute

LabelsSchema returns a map attribute schema with validation for the labels field shared by multiple resources.

func ParseID

func ParseID(value types.String) (int, diag.Diagnostics)

Types

This section is empty.

Jump to

Keyboard shortcuts

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