tfpluginschema

package module
v0.0.0-...-0525d7d Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

README

PkgGoDev

tfpluginschema

Terraform schema definition stands in the middle of the Terraform core schema and the Plugin SDK/FW schema.

Why

The motivation for this is to add more information that is lost during the conversion from plugin sdk to the terraform core schema. These information are fatal for developing tools that is oriented to the provider, rather than to the terraform core.

Specifically, we are:

  1. Adding Default for the Attribute
  2. Adding Required, Optional, Computed for the BlockType (SDK v2 only)
  3. Adding ExactlyOneOf, AtLeastOneOf, ConflictsWith and RequiredWith for both BlockType and the Attribute (SDK v2 only)
  4. Removing any other attributes

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFWProvider

func FromFWProvider(p provider.Provider) (*schema.ProviderSchema, error)

func FromSDKv2Provider

func FromSDKv2Provider(p *sdkschema.Provider) *schema.ProviderSchema

FromSDKv2Provider converts the provider from the schema defined in the plugin sdk v2 to the schema defined in tfpluginschema.

func FromSDKv2Resource

func FromSDKv2Resource(res *sdkschema.Resource) *schema.Schema

FromSDKv2Resource converts the resource from the schema defined in the plugin sdk v2 to the schema defined in tfpluginschema.

func FromSDKv2SchemaMap

func FromSDKv2SchemaMap(m map[string]*sdkschema.Schema) *schema.SchemaBlock

FromSDKv2SchemasMap converts the schema map from the schema defined in the plugin sdk v2 to the schema defined in tfpluginschema.

Types

This section is empty.

Directories

Path Synopsis
internal
fw

Jump to

Keyboard shortcuts

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