Documentation ¶
Index ¶
- func BuildDataSourceAttributeMap(attributes map[string]AttributeBuilder) map[string]dataschema.Attribute
- func BuildDataSourceBlockMap(attributes map[string]BlockBuilder) map[string]dataschema.Block
- func BuildResourceAttributeMap(attributes map[string]AttributeBuilder) map[string]schema.Attribute
- func BuildResourceBlockMap(attributes map[string]BlockBuilder) map[string]schema.Block
- func DataSourceStructToSchema(ctx context.Context, v any, ...) dataschema.Schema
- func DataSourceStructToSchemaMap(ctx context.Context, v any, ...) (map[string]dataschema.Attribute, map[string]dataschema.Block)
- func ResourceStructToSchema(ctx context.Context, v any, ...) schema.Schema
- func ResourceStructToSchemaMap(ctx context.Context, v any, ...) (map[string]schema.Attribute, map[string]schema.Block)
- type AttributeBuilder
- type BaseSchemaBuilder
- type BlockBuilder
- type Blockable
- type BoolAttributeBuilder
- func (a BoolAttributeBuilder) AddPlanModifier(v planmodifier.Bool) AttributeBuilder
- func (a BoolAttributeBuilder) AddValidator(v validator.Bool) AttributeBuilder
- func (a BoolAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a BoolAttributeBuilder) BuildResourceAttribute() schema.Attribute
- func (a BoolAttributeBuilder) SetComputed() AttributeBuilder
- func (a BoolAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a BoolAttributeBuilder) SetOptional() AttributeBuilder
- func (a BoolAttributeBuilder) SetReadOnly() AttributeBuilder
- func (a BoolAttributeBuilder) SetRequired() AttributeBuilder
- func (a BoolAttributeBuilder) SetSensitive() AttributeBuilder
- type CustomizableSchema
- func (s *CustomizableSchema) AddPlanModifier(v any, path ...string) *CustomizableSchema
- func (s *CustomizableSchema) AddValidator(v any, path ...string) *CustomizableSchema
- func (s *CustomizableSchema) ConfigureAsSdkV2Compatible() *CustomizableSchema
- func (s *CustomizableSchema) SetComputed(path ...string) *CustomizableSchema
- func (s *CustomizableSchema) SetDeprecated(msg string, path ...string) *CustomizableSchema
- func (s *CustomizableSchema) SetOptional(path ...string) *CustomizableSchema
- func (s *CustomizableSchema) SetReadOnly(path ...string) *CustomizableSchema
- func (s *CustomizableSchema) SetRequired(path ...string) *CustomizableSchema
- func (s *CustomizableSchema) SetSensitive(path ...string) *CustomizableSchema
- func (s *CustomizableSchema) ToNestedBlockObject() NestedBlockObject
- type Float64AttributeBuilder
- func (a Float64AttributeBuilder) AddPlanModifier(v planmodifier.Float64) AttributeBuilder
- func (a Float64AttributeBuilder) AddValidator(v validator.Float64) AttributeBuilder
- func (a Float64AttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a Float64AttributeBuilder) BuildResourceAttribute() schema.Attribute
- func (a Float64AttributeBuilder) SetComputed() AttributeBuilder
- func (a Float64AttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a Float64AttributeBuilder) SetOptional() AttributeBuilder
- func (a Float64AttributeBuilder) SetReadOnly() AttributeBuilder
- func (a Float64AttributeBuilder) SetRequired() AttributeBuilder
- func (a Float64AttributeBuilder) SetSensitive() AttributeBuilder
- type Int64AttributeBuilder
- func (a Int64AttributeBuilder) AddPlanModifier(v planmodifier.Int64) AttributeBuilder
- func (a Int64AttributeBuilder) AddValidator(v validator.Int64) AttributeBuilder
- func (a Int64AttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a Int64AttributeBuilder) BuildResourceAttribute() schema.Attribute
- func (a Int64AttributeBuilder) SetComputed() AttributeBuilder
- func (a Int64AttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a Int64AttributeBuilder) SetOptional() AttributeBuilder
- func (a Int64AttributeBuilder) SetReadOnly() AttributeBuilder
- func (a Int64AttributeBuilder) SetRequired() AttributeBuilder
- func (a Int64AttributeBuilder) SetSensitive() AttributeBuilder
- type ListAttributeBuilder
- func (a ListAttributeBuilder) AddPlanModifier(v planmodifier.List) AttributeBuilder
- func (a ListAttributeBuilder) AddValidator(v validator.List) AttributeBuilder
- func (a ListAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a ListAttributeBuilder) BuildResourceAttribute() schema.Attribute
- func (a ListAttributeBuilder) SetComputed() AttributeBuilder
- func (a ListAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a ListAttributeBuilder) SetOptional() AttributeBuilder
- func (a ListAttributeBuilder) SetReadOnly() AttributeBuilder
- func (a ListAttributeBuilder) SetRequired() AttributeBuilder
- func (a ListAttributeBuilder) SetSensitive() AttributeBuilder
- type ListNestedAttributeBuilder
- func (a ListNestedAttributeBuilder) AddPlanModifier(v planmodifier.List) BaseSchemaBuilder
- func (a ListNestedAttributeBuilder) AddValidator(v validator.List) BaseSchemaBuilder
- func (a ListNestedAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a ListNestedAttributeBuilder) BuildResourceAttribute() schema.Attribute
- func (a ListNestedAttributeBuilder) SetComputed() AttributeBuilder
- func (a ListNestedAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a ListNestedAttributeBuilder) SetOptional() AttributeBuilder
- func (a ListNestedAttributeBuilder) SetReadOnly() AttributeBuilder
- func (a ListNestedAttributeBuilder) SetRequired() AttributeBuilder
- func (a ListNestedAttributeBuilder) SetSensitive() AttributeBuilder
- func (a ListNestedAttributeBuilder) ToBlock() BlockBuilder
- type ListNestedBlockBuilder
- func (a ListNestedBlockBuilder) AddPlanModifier(v planmodifier.List) BaseSchemaBuilder
- func (a ListNestedBlockBuilder) AddValidator(v validator.List) BaseSchemaBuilder
- func (a ListNestedBlockBuilder) BuildDataSourceBlock() dataschema.Block
- func (a ListNestedBlockBuilder) BuildResourceBlock() schema.Block
- func (a ListNestedBlockBuilder) ConvertBlockToAttribute(field string) BaseSchemaBuilder
- func (a ListNestedBlockBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a ListNestedBlockBuilder) ToAttribute() AttributeBuilder
- type MapAttributeBuilder
- func (a MapAttributeBuilder) AddPlanModifier(v planmodifier.Map) AttributeBuilder
- func (a MapAttributeBuilder) AddValidator(v validator.Map) AttributeBuilder
- func (a MapAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a MapAttributeBuilder) BuildResourceAttribute() schema.Attribute
- func (a MapAttributeBuilder) SetComputed() AttributeBuilder
- func (a MapAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a MapAttributeBuilder) SetOptional() AttributeBuilder
- func (a MapAttributeBuilder) SetReadOnly() AttributeBuilder
- func (a MapAttributeBuilder) SetRequired() AttributeBuilder
- func (a MapAttributeBuilder) SetSensitive() AttributeBuilder
- type MapNestedAttributeBuilder
- func (a MapNestedAttributeBuilder) AddPlanModifier(v planmodifier.Map) AttributeBuilder
- func (a MapNestedAttributeBuilder) AddValidator(v validator.Map) AttributeBuilder
- func (a MapNestedAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a MapNestedAttributeBuilder) BuildResourceAttribute() schema.Attribute
- func (a MapNestedAttributeBuilder) SetComputed() AttributeBuilder
- func (a MapNestedAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a MapNestedAttributeBuilder) SetOptional() AttributeBuilder
- func (a MapNestedAttributeBuilder) SetReadOnly() AttributeBuilder
- func (a MapNestedAttributeBuilder) SetRequired() AttributeBuilder
- func (a MapNestedAttributeBuilder) SetSensitive() AttributeBuilder
- type NestedAttributeObject
- type NestedBlockObject
- type SingleNestedAttributeBuilder
- func (a SingleNestedAttributeBuilder) AddPlanModifier(v planmodifier.Object) AttributeBuilder
- func (a SingleNestedAttributeBuilder) AddValidator(v validator.Object) AttributeBuilder
- func (a SingleNestedAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a SingleNestedAttributeBuilder) BuildResourceAttribute() schema.Attribute
- func (a SingleNestedAttributeBuilder) SetComputed() AttributeBuilder
- func (a SingleNestedAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a SingleNestedAttributeBuilder) SetOptional() AttributeBuilder
- func (a SingleNestedAttributeBuilder) SetReadOnly() AttributeBuilder
- func (a SingleNestedAttributeBuilder) SetRequired() AttributeBuilder
- func (a SingleNestedAttributeBuilder) SetSensitive() AttributeBuilder
- func (a SingleNestedAttributeBuilder) ToBlock() BlockBuilder
- type SingleNestedBlockBuilder
- func (a SingleNestedBlockBuilder) AddPlanModifier(v planmodifier.Object) BaseSchemaBuilder
- func (a SingleNestedBlockBuilder) AddValidator(v validator.Object) BaseSchemaBuilder
- func (a SingleNestedBlockBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a SingleNestedBlockBuilder) BuildDataSourceBlock() dataschema.Block
- func (a SingleNestedBlockBuilder) BuildResourceAttribute() schema.Attribute
- func (a SingleNestedBlockBuilder) BuildResourceBlock() schema.Block
- func (a SingleNestedBlockBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a SingleNestedBlockBuilder) ToAttribute() AttributeBuilder
- type StringAttributeBuilder
- func (a StringAttributeBuilder) AddPlanModifier(v planmodifier.String) AttributeBuilder
- func (a StringAttributeBuilder) AddValidator(v validator.String) AttributeBuilder
- func (a StringAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
- func (a StringAttributeBuilder) BuildResourceAttribute() schema.Attribute
- func (a StringAttributeBuilder) SetComputed() AttributeBuilder
- func (a StringAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
- func (a StringAttributeBuilder) SetOptional() AttributeBuilder
- func (a StringAttributeBuilder) SetReadOnly() AttributeBuilder
- func (a StringAttributeBuilder) SetRequired() AttributeBuilder
- func (a StringAttributeBuilder) SetSensitive() AttributeBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDataSourceAttributeMap ¶
func BuildDataSourceAttributeMap(attributes map[string]AttributeBuilder) map[string]dataschema.Attribute
BuildDataSourceAttributeMap takes a map from string to AttributeBuilder and returns a map from string to datasource.schema.Attribute.
func BuildDataSourceBlockMap ¶ added in v1.54.0
func BuildDataSourceBlockMap(attributes map[string]BlockBuilder) map[string]dataschema.Block
func BuildResourceAttributeMap ¶
func BuildResourceAttributeMap(attributes map[string]AttributeBuilder) map[string]schema.Attribute
BuildResourceAttributeMap takes a map from string to AttributeBuilder and returns a map from string to resource.schema.Attribute.
func BuildResourceBlockMap ¶ added in v1.54.0
func BuildResourceBlockMap(attributes map[string]BlockBuilder) map[string]schema.Block
func DataSourceStructToSchema ¶
func DataSourceStructToSchema(ctx context.Context, v any, customizeSchema func(CustomizableSchema) CustomizableSchema) dataschema.Schema
DataSourceStructToSchema builds a data source schema from a tfsdk struct, with custoimzations applied.
func DataSourceStructToSchemaMap ¶
func DataSourceStructToSchemaMap(ctx context.Context, v any, customizeSchema func(CustomizableSchema) CustomizableSchema) (map[string]dataschema.Attribute, map[string]dataschema.Block)
DataSourceStructToSchemaMap returns twp maps from string to data source schema attributes and blocks using a tfsdk struct, with custoimzations applied.
func ResourceStructToSchema ¶
func ResourceStructToSchema(ctx context.Context, v any, customizeSchema func(CustomizableSchema) CustomizableSchema) schema.Schema
ResourceStructToSchema builds a resource schema from a tfsdk struct, with custoimzations applied.
func ResourceStructToSchemaMap ¶
func ResourceStructToSchemaMap(ctx context.Context, v any, customizeSchema func(CustomizableSchema) CustomizableSchema) (map[string]schema.Attribute, map[string]schema.Block)
ResourceStructToSchemaMap returns two maps from string to resource schema attributes and blocks using a tfsdk struct, with custoimzations applied.
Types ¶
type AttributeBuilder ¶
type AttributeBuilder interface { BaseSchemaBuilder // SetOptional sets the attribute as optional in the schema. This does not affect whether the attribute is computed. // It fails if the attribute is already optional. SetOptional() AttributeBuilder // SetRequired sets the attribute as required in the schema. This does not affect whether the attribute is computed. // It fails if the attribute is already required. SetRequired() AttributeBuilder // SetSensitive sets the attribute as sensitive in the schema. It fails if the attribute is already sensitive. SetSensitive() AttributeBuilder // SetComputed sets the attribute as computed in the schema. It fails if the attribute is already computed. SetComputed() AttributeBuilder // Sets the attribute as read-only in the schema, i.e. computed and neither optional or required. It fails if the // attribute is already read-only. SetReadOnly() AttributeBuilder BuildDataSourceAttribute() dataschema.Attribute BuildResourceAttribute() schema.Attribute }
AttributeBuilder is the common interface for all attributes, it can be used to build data source attribute and resource attribute. We need this because in terraform plugin framework, the datasource schema and resource schema are in two separate packages. This common interface prevents us from keeping two copies of StructToSchema and CustomizableSchema.
type BaseSchemaBuilder ¶ added in v1.54.0
type BaseSchemaBuilder interface {
SetDeprecated(string) BaseSchemaBuilder
}
BaseSchemaBuilder is the common interface for all blocks and attributes, it can be used to build data source and resource. Both AttributeBuilder and BlockBuilder extend this interface.
type BlockBuilder ¶ added in v1.54.0
type BlockBuilder interface { BaseSchemaBuilder // ToAttribute converts a block to its corresponding attribute type. Currently, ResourceStructToSchema converts all // nested struct fields and slices to blocks. This method is used to convert those blocks to their corresponding // attribute type. The resulting attribute will not have any of the Computed/Optional/Required/Sensitive flags set. ToAttribute() AttributeBuilder BuildDataSourceBlock() dataschema.Block BuildResourceBlock() schema.Block }
BlockBuilder is the common interface for all blocks, it can be used to build data source blocks and resource blocks. We need this because in terraform plugin framework, the datasource schema and resource schema are in two separate packages. This common interface prevents us from keeping two copies of StructToSchema and CustomizableSchema.
type Blockable ¶ added in v1.61.0
type Blockable interface { // ToBlock converts the AttributeBuilder to a BlockBuilder. ToBlock() BlockBuilder }
Blockable is an interface that can be implemented by an AttributeBuilder to convert it to a BlockBuilder.
type BoolAttributeBuilder ¶
type BoolAttributeBuilder struct { Optional bool Required bool Sensitive bool Computed bool DeprecationMessage string Validators []validator.Bool PlanModifiers []planmodifier.Bool }
func (BoolAttributeBuilder) AddPlanModifier ¶
func (a BoolAttributeBuilder) AddPlanModifier(v planmodifier.Bool) AttributeBuilder
func (BoolAttributeBuilder) AddValidator ¶
func (a BoolAttributeBuilder) AddValidator(v validator.Bool) AttributeBuilder
func (BoolAttributeBuilder) BuildDataSourceAttribute ¶
func (a BoolAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (BoolAttributeBuilder) BuildResourceAttribute ¶
func (a BoolAttributeBuilder) BuildResourceAttribute() schema.Attribute
func (BoolAttributeBuilder) SetComputed ¶
func (a BoolAttributeBuilder) SetComputed() AttributeBuilder
func (BoolAttributeBuilder) SetDeprecated ¶
func (a BoolAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (BoolAttributeBuilder) SetOptional ¶
func (a BoolAttributeBuilder) SetOptional() AttributeBuilder
func (BoolAttributeBuilder) SetReadOnly ¶
func (a BoolAttributeBuilder) SetReadOnly() AttributeBuilder
func (BoolAttributeBuilder) SetRequired ¶
func (a BoolAttributeBuilder) SetRequired() AttributeBuilder
func (BoolAttributeBuilder) SetSensitive ¶
func (a BoolAttributeBuilder) SetSensitive() AttributeBuilder
type CustomizableSchema ¶
type CustomizableSchema struct {
// contains filtered or unexported fields
}
CustomizableSchema is a wrapper struct on top of BaseSchemaBuilder that can be used to navigate through nested schema add customizations. The methods of CustomizableSchema that modify the underlying schema should return the same CustomizableSchema object to allow chaining.
func ConstructCustomizableSchema ¶
func ConstructCustomizableSchema(nestedObject NestedBlockObject) *CustomizableSchema
ConstructCustomizableSchema constructs a CustomizableSchema given a NestedBlockObject.
func (*CustomizableSchema) AddPlanModifier ¶
func (s *CustomizableSchema) AddPlanModifier(v any, path ...string) *CustomizableSchema
func (*CustomizableSchema) AddValidator ¶
func (s *CustomizableSchema) AddValidator(v any, path ...string) *CustomizableSchema
func (*CustomizableSchema) ConfigureAsSdkV2Compatible ¶ added in v1.61.0
func (s *CustomizableSchema) ConfigureAsSdkV2Compatible() *CustomizableSchema
ConfigureAsSdkV2Compatible modifies the underlying schema to be compatible with SDKv2. This method must be called on all resources that were originally implemented using the SDKv2 and are migrated to the plugin framework.
func (*CustomizableSchema) SetComputed ¶
func (s *CustomizableSchema) SetComputed(path ...string) *CustomizableSchema
func (*CustomizableSchema) SetDeprecated ¶
func (s *CustomizableSchema) SetDeprecated(msg string, path ...string) *CustomizableSchema
func (*CustomizableSchema) SetOptional ¶
func (s *CustomizableSchema) SetOptional(path ...string) *CustomizableSchema
func (*CustomizableSchema) SetReadOnly ¶
func (s *CustomizableSchema) SetReadOnly(path ...string) *CustomizableSchema
SetReadOnly sets the schema to be read-only (i.e. computed, non-optional). This should be used for fields that are not user-configurable but are returned by the platform.
func (*CustomizableSchema) SetRequired ¶
func (s *CustomizableSchema) SetRequired(path ...string) *CustomizableSchema
func (*CustomizableSchema) SetSensitive ¶
func (s *CustomizableSchema) SetSensitive(path ...string) *CustomizableSchema
func (*CustomizableSchema) ToNestedBlockObject ¶ added in v1.54.0
func (s *CustomizableSchema) ToNestedBlockObject() NestedBlockObject
ToAttributeMap converts CustomizableSchema into BaseSchemaBuilder.
type Float64AttributeBuilder ¶
type Float64AttributeBuilder struct { Optional bool Required bool Sensitive bool Computed bool DeprecationMessage string Validators []validator.Float64 PlanModifiers []planmodifier.Float64 }
func (Float64AttributeBuilder) AddPlanModifier ¶
func (a Float64AttributeBuilder) AddPlanModifier(v planmodifier.Float64) AttributeBuilder
func (Float64AttributeBuilder) AddValidator ¶
func (a Float64AttributeBuilder) AddValidator(v validator.Float64) AttributeBuilder
func (Float64AttributeBuilder) BuildDataSourceAttribute ¶
func (a Float64AttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (Float64AttributeBuilder) BuildResourceAttribute ¶
func (a Float64AttributeBuilder) BuildResourceAttribute() schema.Attribute
func (Float64AttributeBuilder) SetComputed ¶
func (a Float64AttributeBuilder) SetComputed() AttributeBuilder
func (Float64AttributeBuilder) SetDeprecated ¶
func (a Float64AttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (Float64AttributeBuilder) SetOptional ¶
func (a Float64AttributeBuilder) SetOptional() AttributeBuilder
func (Float64AttributeBuilder) SetReadOnly ¶
func (a Float64AttributeBuilder) SetReadOnly() AttributeBuilder
func (Float64AttributeBuilder) SetRequired ¶
func (a Float64AttributeBuilder) SetRequired() AttributeBuilder
func (Float64AttributeBuilder) SetSensitive ¶
func (a Float64AttributeBuilder) SetSensitive() AttributeBuilder
type Int64AttributeBuilder ¶
type Int64AttributeBuilder struct { Optional bool Required bool Sensitive bool Computed bool DeprecationMessage string Validators []validator.Int64 PlanModifiers []planmodifier.Int64 }
func (Int64AttributeBuilder) AddPlanModifier ¶
func (a Int64AttributeBuilder) AddPlanModifier(v planmodifier.Int64) AttributeBuilder
func (Int64AttributeBuilder) AddValidator ¶
func (a Int64AttributeBuilder) AddValidator(v validator.Int64) AttributeBuilder
func (Int64AttributeBuilder) BuildDataSourceAttribute ¶
func (a Int64AttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (Int64AttributeBuilder) BuildResourceAttribute ¶
func (a Int64AttributeBuilder) BuildResourceAttribute() schema.Attribute
func (Int64AttributeBuilder) SetComputed ¶
func (a Int64AttributeBuilder) SetComputed() AttributeBuilder
func (Int64AttributeBuilder) SetDeprecated ¶
func (a Int64AttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (Int64AttributeBuilder) SetOptional ¶
func (a Int64AttributeBuilder) SetOptional() AttributeBuilder
func (Int64AttributeBuilder) SetReadOnly ¶
func (a Int64AttributeBuilder) SetReadOnly() AttributeBuilder
func (Int64AttributeBuilder) SetRequired ¶
func (a Int64AttributeBuilder) SetRequired() AttributeBuilder
func (Int64AttributeBuilder) SetSensitive ¶
func (a Int64AttributeBuilder) SetSensitive() AttributeBuilder
type ListAttributeBuilder ¶
type ListAttributeBuilder struct { ElementType attr.Type Optional bool Required bool Sensitive bool Computed bool DeprecationMessage string Validators []validator.List PlanModifiers []planmodifier.List }
ListAttributteBuilder represents a list of primitive types.
func (ListAttributeBuilder) AddPlanModifier ¶
func (a ListAttributeBuilder) AddPlanModifier(v planmodifier.List) AttributeBuilder
func (ListAttributeBuilder) AddValidator ¶
func (a ListAttributeBuilder) AddValidator(v validator.List) AttributeBuilder
func (ListAttributeBuilder) BuildDataSourceAttribute ¶
func (a ListAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (ListAttributeBuilder) BuildResourceAttribute ¶
func (a ListAttributeBuilder) BuildResourceAttribute() schema.Attribute
func (ListAttributeBuilder) SetComputed ¶
func (a ListAttributeBuilder) SetComputed() AttributeBuilder
func (ListAttributeBuilder) SetDeprecated ¶
func (a ListAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (ListAttributeBuilder) SetOptional ¶
func (a ListAttributeBuilder) SetOptional() AttributeBuilder
func (ListAttributeBuilder) SetReadOnly ¶
func (a ListAttributeBuilder) SetReadOnly() AttributeBuilder
func (ListAttributeBuilder) SetRequired ¶
func (a ListAttributeBuilder) SetRequired() AttributeBuilder
func (ListAttributeBuilder) SetSensitive ¶
func (a ListAttributeBuilder) SetSensitive() AttributeBuilder
type ListNestedAttributeBuilder ¶
type ListNestedAttributeBuilder struct { NestedObject NestedAttributeObject Optional bool Required bool Sensitive bool Computed bool DeprecationMessage string Validators []validator.List PlanModifiers []planmodifier.List }
ListNestedAttributteBuilder represents a list of complex (non-primitive) types.
func (ListNestedAttributeBuilder) AddPlanModifier ¶
func (a ListNestedAttributeBuilder) AddPlanModifier(v planmodifier.List) BaseSchemaBuilder
func (ListNestedAttributeBuilder) AddValidator ¶
func (a ListNestedAttributeBuilder) AddValidator(v validator.List) BaseSchemaBuilder
func (ListNestedAttributeBuilder) BuildDataSourceAttribute ¶
func (a ListNestedAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (ListNestedAttributeBuilder) BuildResourceAttribute ¶
func (a ListNestedAttributeBuilder) BuildResourceAttribute() schema.Attribute
func (ListNestedAttributeBuilder) SetComputed ¶
func (a ListNestedAttributeBuilder) SetComputed() AttributeBuilder
func (ListNestedAttributeBuilder) SetDeprecated ¶
func (a ListNestedAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (ListNestedAttributeBuilder) SetOptional ¶
func (a ListNestedAttributeBuilder) SetOptional() AttributeBuilder
func (ListNestedAttributeBuilder) SetReadOnly ¶
func (a ListNestedAttributeBuilder) SetReadOnly() AttributeBuilder
func (ListNestedAttributeBuilder) SetRequired ¶
func (a ListNestedAttributeBuilder) SetRequired() AttributeBuilder
func (ListNestedAttributeBuilder) SetSensitive ¶
func (a ListNestedAttributeBuilder) SetSensitive() AttributeBuilder
func (ListNestedAttributeBuilder) ToBlock ¶ added in v1.61.0
func (a ListNestedAttributeBuilder) ToBlock() BlockBuilder
type ListNestedBlockBuilder ¶ added in v1.54.0
type ListNestedBlockBuilder struct { NestedObject NestedBlockObject DeprecationMessage string Validators []validator.List PlanModifiers []planmodifier.List }
ListNestedBlockBuilder represents a list of complex (non-primitive) types. To be compatible with our sdkv2 schema, all struct types in the gosdk are represented with this type.
func (ListNestedBlockBuilder) AddPlanModifier ¶ added in v1.54.0
func (a ListNestedBlockBuilder) AddPlanModifier(v planmodifier.List) BaseSchemaBuilder
func (ListNestedBlockBuilder) AddValidator ¶ added in v1.54.0
func (a ListNestedBlockBuilder) AddValidator(v validator.List) BaseSchemaBuilder
func (ListNestedBlockBuilder) BuildDataSourceBlock ¶ added in v1.54.0
func (a ListNestedBlockBuilder) BuildDataSourceBlock() dataschema.Block
func (ListNestedBlockBuilder) BuildResourceBlock ¶ added in v1.54.0
func (a ListNestedBlockBuilder) BuildResourceBlock() schema.Block
func (ListNestedBlockBuilder) ConvertBlockToAttribute ¶ added in v1.60.0
func (a ListNestedBlockBuilder) ConvertBlockToAttribute(field string) BaseSchemaBuilder
func (ListNestedBlockBuilder) SetDeprecated ¶ added in v1.54.0
func (a ListNestedBlockBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (ListNestedBlockBuilder) ToAttribute ¶ added in v1.60.0
func (a ListNestedBlockBuilder) ToAttribute() AttributeBuilder
type MapAttributeBuilder ¶
type MapAttributeBuilder struct { ElementType attr.Type Optional bool Required bool Sensitive bool Computed bool DeprecationMessage string Validators []validator.Map PlanModifiers []planmodifier.Map }
MapAttributteBuilder represents a map of primitive types.
func (MapAttributeBuilder) AddPlanModifier ¶
func (a MapAttributeBuilder) AddPlanModifier(v planmodifier.Map) AttributeBuilder
func (MapAttributeBuilder) AddValidator ¶
func (a MapAttributeBuilder) AddValidator(v validator.Map) AttributeBuilder
func (MapAttributeBuilder) BuildDataSourceAttribute ¶
func (a MapAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (MapAttributeBuilder) BuildResourceAttribute ¶
func (a MapAttributeBuilder) BuildResourceAttribute() schema.Attribute
func (MapAttributeBuilder) SetComputed ¶
func (a MapAttributeBuilder) SetComputed() AttributeBuilder
func (MapAttributeBuilder) SetDeprecated ¶
func (a MapAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (MapAttributeBuilder) SetOptional ¶
func (a MapAttributeBuilder) SetOptional() AttributeBuilder
func (MapAttributeBuilder) SetReadOnly ¶
func (a MapAttributeBuilder) SetReadOnly() AttributeBuilder
func (MapAttributeBuilder) SetRequired ¶
func (a MapAttributeBuilder) SetRequired() AttributeBuilder
func (MapAttributeBuilder) SetSensitive ¶
func (a MapAttributeBuilder) SetSensitive() AttributeBuilder
type MapNestedAttributeBuilder ¶
type MapNestedAttributeBuilder struct { NestedObject NestedAttributeObject Optional bool Required bool Sensitive bool Computed bool DeprecationMessage string Validators []validator.Map PlanModifiers []planmodifier.Map }
MapNestedAttributteBuilder represents a map of complex (non-primitive) types.
func (MapNestedAttributeBuilder) AddPlanModifier ¶
func (a MapNestedAttributeBuilder) AddPlanModifier(v planmodifier.Map) AttributeBuilder
func (MapNestedAttributeBuilder) AddValidator ¶
func (a MapNestedAttributeBuilder) AddValidator(v validator.Map) AttributeBuilder
func (MapNestedAttributeBuilder) BuildDataSourceAttribute ¶
func (a MapNestedAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (MapNestedAttributeBuilder) BuildResourceAttribute ¶
func (a MapNestedAttributeBuilder) BuildResourceAttribute() schema.Attribute
func (MapNestedAttributeBuilder) SetComputed ¶
func (a MapNestedAttributeBuilder) SetComputed() AttributeBuilder
func (MapNestedAttributeBuilder) SetDeprecated ¶
func (a MapNestedAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (MapNestedAttributeBuilder) SetOptional ¶
func (a MapNestedAttributeBuilder) SetOptional() AttributeBuilder
func (MapNestedAttributeBuilder) SetReadOnly ¶
func (a MapNestedAttributeBuilder) SetReadOnly() AttributeBuilder
func (MapNestedAttributeBuilder) SetRequired ¶
func (a MapNestedAttributeBuilder) SetRequired() AttributeBuilder
func (MapNestedAttributeBuilder) SetSensitive ¶
func (a MapNestedAttributeBuilder) SetSensitive() AttributeBuilder
type NestedAttributeObject ¶
type NestedAttributeObject struct {
Attributes map[string]AttributeBuilder
}
NestedAttributteObject is the intermediate type for nested complex (non-primitive) types.
func (NestedAttributeObject) BuildDataSourceAttribute ¶
func (a NestedAttributeObject) BuildDataSourceAttribute() dataschema.NestedAttributeObject
func (NestedAttributeObject) BuildResourceAttribute ¶
func (a NestedAttributeObject) BuildResourceAttribute() schema.NestedAttributeObject
func (NestedAttributeObject) SetReadOnly ¶ added in v1.61.0
func (a NestedAttributeObject) SetReadOnly()
type NestedBlockObject ¶ added in v1.54.0
type NestedBlockObject struct { Attributes map[string]AttributeBuilder Blocks map[string]BlockBuilder }
NestedAttributteObject is the intermediate type for nested complex (non-primitive) types.
func (NestedBlockObject) BuildDataSourceAttribute ¶ added in v1.54.0
func (a NestedBlockObject) BuildDataSourceAttribute() dataschema.NestedBlockObject
func (NestedBlockObject) BuildResourceAttribute ¶ added in v1.54.0
func (a NestedBlockObject) BuildResourceAttribute() schema.NestedBlockObject
func (NestedBlockObject) ToNestedAttributeObject ¶ added in v1.60.0
func (a NestedBlockObject) ToNestedAttributeObject() NestedAttributeObject
type SingleNestedAttributeBuilder ¶
type SingleNestedAttributeBuilder struct { Attributes map[string]AttributeBuilder Optional bool Required bool Sensitive bool Computed bool DeprecationMessage string Validators []validator.Object PlanModifiers []planmodifier.Object }
SingleNestedAttributteBuilder represents single complex (struct) types.
func (SingleNestedAttributeBuilder) AddPlanModifier ¶
func (a SingleNestedAttributeBuilder) AddPlanModifier(v planmodifier.Object) AttributeBuilder
func (SingleNestedAttributeBuilder) AddValidator ¶
func (a SingleNestedAttributeBuilder) AddValidator(v validator.Object) AttributeBuilder
func (SingleNestedAttributeBuilder) BuildDataSourceAttribute ¶
func (a SingleNestedAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (SingleNestedAttributeBuilder) BuildResourceAttribute ¶
func (a SingleNestedAttributeBuilder) BuildResourceAttribute() schema.Attribute
func (SingleNestedAttributeBuilder) SetComputed ¶
func (a SingleNestedAttributeBuilder) SetComputed() AttributeBuilder
func (SingleNestedAttributeBuilder) SetDeprecated ¶
func (a SingleNestedAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (SingleNestedAttributeBuilder) SetOptional ¶
func (a SingleNestedAttributeBuilder) SetOptional() AttributeBuilder
func (SingleNestedAttributeBuilder) SetReadOnly ¶
func (a SingleNestedAttributeBuilder) SetReadOnly() AttributeBuilder
func (SingleNestedAttributeBuilder) SetRequired ¶
func (a SingleNestedAttributeBuilder) SetRequired() AttributeBuilder
func (SingleNestedAttributeBuilder) SetSensitive ¶
func (a SingleNestedAttributeBuilder) SetSensitive() AttributeBuilder
func (SingleNestedAttributeBuilder) ToBlock ¶ added in v1.61.0
func (a SingleNestedAttributeBuilder) ToBlock() BlockBuilder
type SingleNestedBlockBuilder ¶ added in v1.54.0
type SingleNestedBlockBuilder struct { NestedObject NestedBlockObject DeprecationMessage string Validators []validator.Object PlanModifiers []planmodifier.Object }
SingleNestedBlockBuilder represents a single nested complex (non-primitive) type.
func (SingleNestedBlockBuilder) AddPlanModifier ¶ added in v1.54.0
func (a SingleNestedBlockBuilder) AddPlanModifier(v planmodifier.Object) BaseSchemaBuilder
func (SingleNestedBlockBuilder) AddValidator ¶ added in v1.54.0
func (a SingleNestedBlockBuilder) AddValidator(v validator.Object) BaseSchemaBuilder
func (SingleNestedBlockBuilder) BuildDataSourceAttribute ¶ added in v1.54.0
func (a SingleNestedBlockBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (SingleNestedBlockBuilder) BuildDataSourceBlock ¶ added in v1.54.0
func (a SingleNestedBlockBuilder) BuildDataSourceBlock() dataschema.Block
func (SingleNestedBlockBuilder) BuildResourceAttribute ¶ added in v1.54.0
func (a SingleNestedBlockBuilder) BuildResourceAttribute() schema.Attribute
func (SingleNestedBlockBuilder) BuildResourceBlock ¶ added in v1.54.0
func (a SingleNestedBlockBuilder) BuildResourceBlock() schema.Block
func (SingleNestedBlockBuilder) SetDeprecated ¶ added in v1.54.0
func (a SingleNestedBlockBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (SingleNestedBlockBuilder) ToAttribute ¶ added in v1.60.0
func (a SingleNestedBlockBuilder) ToAttribute() AttributeBuilder
type StringAttributeBuilder ¶
type StringAttributeBuilder struct { Optional bool Required bool Sensitive bool Computed bool DeprecationMessage string Validators []validator.String PlanModifiers []planmodifier.String }
func (StringAttributeBuilder) AddPlanModifier ¶
func (a StringAttributeBuilder) AddPlanModifier(v planmodifier.String) AttributeBuilder
func (StringAttributeBuilder) AddValidator ¶
func (a StringAttributeBuilder) AddValidator(v validator.String) AttributeBuilder
func (StringAttributeBuilder) BuildDataSourceAttribute ¶
func (a StringAttributeBuilder) BuildDataSourceAttribute() dataschema.Attribute
func (StringAttributeBuilder) BuildResourceAttribute ¶
func (a StringAttributeBuilder) BuildResourceAttribute() schema.Attribute
func (StringAttributeBuilder) SetComputed ¶
func (a StringAttributeBuilder) SetComputed() AttributeBuilder
func (StringAttributeBuilder) SetDeprecated ¶
func (a StringAttributeBuilder) SetDeprecated(msg string) BaseSchemaBuilder
func (StringAttributeBuilder) SetOptional ¶
func (a StringAttributeBuilder) SetOptional() AttributeBuilder
func (StringAttributeBuilder) SetReadOnly ¶
func (a StringAttributeBuilder) SetReadOnly() AttributeBuilder
func (StringAttributeBuilder) SetRequired ¶
func (a StringAttributeBuilder) SetRequired() AttributeBuilder
func (StringAttributeBuilder) SetSensitive ¶
func (a StringAttributeBuilder) SetSensitive() AttributeBuilder
Source Files ¶
- attribute_builder.go
- attribute_converter.go
- base_schema_builder.go
- block_builder.go
- bool_attribute.go
- customizable_schema.go
- float64_attribute.go
- int64_attribute.go
- list_attribute.go
- list_nested_attribute.go
- list_nested_block.go
- map_attribute.go
- map_nested_attribute.go
- nested_attribute_object.go
- nested_block_object.go
- single_nested_attribute.go
- single_nested_block.go
- string_attribute.go
- struct_to_schema.go