package
0.6.3
Repository: https://github.com/ibm-cloud/terraform.git
Documentation: pkg.go.dev

# README

Terraform Helper Lib: schema

The schema package provides a high-level interface for writing resource providers for Terraform.

If you're writing a resource provider, we recommend you use this package.

The interface exposed by this package is much friendlier than trying to write to the Terraform API directly. The core Terraform API is low-level and built for maximum flexibility and control, whereas this library is built as a framework around that to more easily write common providers.

# Functions

CopySet returns a copy of another set.
EnvDefaultFunc is a helper function that returns the value of the given environment variable, if one exists, or the default value otherwise.
HashString hashes strings.
MultiEnvDefaultFunc is a helper function that returns the value of the first environment variable in the given list that returns a non-empty value.
NewSet is a convenience method for creating a new set with the given items.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

ConfigFieldReader reads fields out of an untyped map[string]string to the best of its ability.
DiffFieldReader reads fields out of a diff structures.
FieldReadResult encapsulates all the resulting data from reading a field.
MapFieldReader reads fields out of an untyped map[string]string to the best of its ability.
MapFieldWriter writes data into a single map[string]string structure.
MultiLevelFieldReader reads from other field readers, merging their results along the way in a specific order.
Provider represents a resource provider in Terraform, and properly implements all of the ResourceProvider API.
Resource represents a thing in Terraform that has a set of configurable attributes and a lifecycle (create, read, update, delete).
ResourceData is used to query and set the attributes of a resource.
Schema is used to describe the structure of a value.
Set is a set data structure that is returned for elements of type TypeSet.

# Interfaces

Equal is an interface that checks for deep equality between two objects.
FieldReaders are responsible for decoding fields out of data into the proper typed representation.
FieldWriters are responsible for writing fields by address into a proper typed representation.
MapReader is an interface that is given to MapFieldReader for accessing a "map".

# Type aliases

BasicMapReader implements MapReader for a single map.
ConfigureFunc is the function used to configure a Provider.
See Resource documentation.
See Resource documentation.
See Resource documentation.
MultiMapReader reads over multiple maps, preferring keys that are founder earlier (lower number index) vs.
See Resource documentation.
SchemaDefaultFunc is a function called to return a default value for a field.
SchemaSetFunc is a function that must return a unique ID for the given element.
SchemaStateFunc is a function used to convert some type to a string to be stored in the state.
SchemaValidateFunc is a function used to validate a single field in the schema.
See Resource documentation.
See Resource documentation.
ValueType is an enum of the type that can be represented by a schema.