Documentation
¶
Overview ¶
Package schema describes provider schemas independently of the plugin protocol version (5 or 6) the provider speaks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct {
Type cty.Type
NestedType *Object
Required bool
Optional bool
Computed bool
Sensitive bool
Deprecated bool
WriteOnly bool
}
Attribute is a single argument of a block. Exactly one of Type and NestedType is set; NestedType is only used by protocol 6 providers.
func (*Attribute) ImpliedType ¶
ImpliedType is the cty type of values that conform to the attribute.
func (*Attribute) IsConfigurable ¶
IsConfigurable reports whether the attribute can be written in configuration, as opposed to being set only by the provider.
type Block ¶
type Block struct {
Attributes map[string]*Attribute
BlockTypes map[string]*NestedBlock
Deprecated bool
}
Block is the body of a resource, a data source, a provider configuration or a nested block.
func (*Block) CoerceValue ¶
CoerceValue turns a partial object, such as a provider configuration built from command line flags, into a value of the block's implied type: missing attributes become null and missing nested blocks become empty.
func (*Block) ImpliedType ¶
ImpliedType is the cty type of values that conform to the block.
type NestedBlock ¶
type NestedBlock struct {
Block
Nesting NestingMode
MinItems int
MaxItems int
}
NestedBlock is a block type that can appear inside another block.
func (*NestedBlock) ImpliedType ¶
func (nb *NestedBlock) ImpliedType() cty.Type
ImpliedType is the cty type of the collection of nested blocks.
type NestingMode ¶
type NestingMode int
NestingMode says how a nested block or a nested attribute object repeats.
const ( NestingSingle NestingMode = iota NestingGroup NestingList NestingSet NestingMap )
type Object ¶
type Object struct {
Attributes map[string]*Attribute
Nesting NestingMode
}
Object is the type of a protocol 6 nested attribute.
func (*Object) ImpliedType ¶
ImpliedType is the cty type of values that conform to the nested object.