dynamic

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NestingModeList = "list"
	NestingModeSet  = "set"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Type     string `json:"type"`
	Optional bool   `json:"optional"`

	List   *Attribute           `json:"list,omitempty"`
	Map    *Attribute           `json:"map,omitempty"`
	Object map[string]Attribute `json:"object,omitempty"`
	Set    *Attribute           `json:"set,omitempty"`
}

func (Attribute) ToTerraformAttribute

func (a Attribute) ToTerraformAttribute() (tfsdk.Attribute, error)

type Block

type Block struct {
	Attributes map[string]Attribute `json:"attributes"`
	Blocks     map[string]Block     `json:"blocks"`
	Mode       string               `json:"mode"`
}

func (Block) ToTerraformBlock

func (b Block) ToTerraformBlock() (tfsdk.Block, error)

type FileReader

type FileReader struct {
	File string
}

func (FileReader) Read

func (r FileReader) Read() (map[string]Resource, error)

type Reader

type Reader interface {
	Read() (map[string]Resource, error)
}

type Resource

type Resource struct {
	Attributes map[string]Attribute
	Blocks     map[string]Block
}

func (Resource) ToTerraformSchema

func (resource Resource) ToTerraformSchema(computed bool) (tfsdk.Schema, diag.Diagnostics)

type StringReader

type StringReader struct {
	Data string
}

func (StringReader) Read

func (r StringReader) Read() (map[string]Resource, error)

Jump to

Keyboard shortcuts

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