schema

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

func Clone[M ~map[K]V, K comparable, V any](m M) M

Clone returns a shallow clone of m.

func ImportResourceGroupID added in v0.49.0

func ImportResourceGroupID(resourceGroup ...string) schema.StateContextFunc

ImportResourceGroupID deconstructs the given ID when terraform import runs, so the attribute groups can be set within the terraform state.

func SetExistingAttributesAsOptional

func SetExistingAttributesAsOptional(schema map[string]*schema.Schema, keys ...string)

SetExistingAttributesAsOptional updates the schema of existing top level attributes by ensuring they are optional by setting Computed and Required to false and Optional to true.

func SetExistingAttributesAsRequired added in v1.4.0

func SetExistingAttributesAsRequired(schema map[string]*schema.Schema, keys ...string)

SetExistingAttributesAsRequired updates the schema of existing top level attributes by ensuring they are required by setting Computed and Optional to false and Required to true.

func SetResourceGroupID added in v1.0.0

func SetResourceGroupID(data *schema.ResourceData, resourceGroup ...string)

SetResourceGroupID sets the ID of the resource when the ID is a combination of multiple resource IDs. If the value is blank, then the resource is destroyed.

func TransformResourceToDataSource

func TransformResourceToDataSource(resourceSchema map[string]*schema.Schema) map[string]*schema.Schema

TransformResourceToDataSource is a recursive function that converts an existing Resource schema to a DataSource schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳