/
block.go
27 lines (25 loc) · 999 Bytes
/
block.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package schema
import (
"github.com/hashicorp/terraform-plugin-framework/internal/fwschema"
)
// Block defines a structural field inside a Schema. Implementations in this
// package include:
// - ListNestedBlock
// - SetNestedBlock
// - SingleNestedBlock
//
// In practitioner configurations, an equals sign (=) cannot be used to set the
// value. Blocks are instead repeated as necessary, or require the use of
// [Dynamic Block Expressions].
//
// Prefer NestedAttribute over Block. Blocks should typically be used for
// configuration compatibility with previously existing schemas from an older
// Terraform Plugin SDK. Efforts should be made to convert from Block to
// NestedAttribute as a breaking change for practitioners.
//
// [Dynamic Block Expressions]: https://developer.hashicorp.com/terraform/language/expressions/dynamic-blocks
//
// [Configuration Reference]: https://developer.hashicorp.com/terraform/language/syntax/configuration
type Block interface {
fwschema.Block
}