schema

package
v1.16.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: MPL-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package schema contains all available schema functionality for list resources. List resource schemas define the structure of a list block. Schemas are implemented via the list.ListResource type Schema method.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute interface {
	fwschema.Attribute
}

Attribute define a value field inside the Schema. Implementations in this package include:

  • BoolAttribute
  • Float32Attribute
  • Float64Attribute
  • Int32Attribute
  • Int64Attribute
  • ListAttribute
  • MapAttribute
  • NumberAttribute
  • StringAttribute

In practitioner configurations, an equals sign (=) is required to set the value. Configuration Reference

type Block

type Block interface {
	fwschema.Block
}

Block defines a structural field inside a Schema. Implementations in this package include:

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.

type BoolAttribute

type BoolAttribute struct {
	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.BoolType. When retrieving data, the basetypes.BoolValuable
	// associated with this custom type must be used in place of types.Bool.
	CustomType basetypes.BoolTypable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.Bool
}

BoolAttribute represents a schema attribute that is a boolean. When retrieving the value for this attribute, use types.Bool as the value type unless the CustomType field is set.

Terraform configurations configure this attribute using expressions that return a boolean or directly via the true/false keywords.

example_attribute = true

Terraform configurations reference this attribute using the attribute name.

.example_attribute

func (BoolAttribute) ApplyTerraform5AttributePathStep

func (a BoolAttribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep always returns an error as it is not possible to step further into a BoolAttribute.

func (BoolAttribute) BoolValidators

func (a BoolAttribute) BoolValidators() []validator.Bool

BoolValidators returns the Validators field value.

func (BoolAttribute) Equal

func (a BoolAttribute) Equal(o fwschema.Attribute) bool

Equal returns true if the given Attribute is a BoolAttribute and all fields are equal.

func (BoolAttribute) GetDeprecationMessage

func (a BoolAttribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (BoolAttribute) GetDescription

func (a BoolAttribute) GetDescription() string

GetDescription returns the Description field value.

func (BoolAttribute) GetMarkdownDescription

func (a BoolAttribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (BoolAttribute) GetType

func (a BoolAttribute) GetType() attr.Type

GetType returns types.StringType or the CustomType field value if defined.

func (BoolAttribute) IsComputed

func (a BoolAttribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (BoolAttribute) IsOptional

func (a BoolAttribute) IsOptional() bool

IsOptional returns the Optional field value.

func (BoolAttribute) IsOptionalForImport

func (a BoolAttribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (BoolAttribute) IsRequired

func (a BoolAttribute) IsRequired() bool

IsRequired returns the Required field value.

func (BoolAttribute) IsRequiredForImport

func (a BoolAttribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (BoolAttribute) IsSensitive

func (a BoolAttribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ListResource schemas.

func (BoolAttribute) IsWriteOnly

func (a BoolAttribute) IsWriteOnly() bool

IsWriteOnly returns false because it does not apply to ListResource schemas.

type DynamicAttribute

type DynamicAttribute struct {
	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.DynamicType. When retrieving data, the basetypes.DynamicValuable
	// associated with this custom type must be used in place of types.Dynamic.
	CustomType basetypes.DynamicTypable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.Dynamic
}

DynamicAttribute represents a schema attribute that is a dynamic, rather than a single static type. Static types are always preferable over dynamic types in Terraform as practitioners will receive less helpful configuration assistance from validation error diagnostics and editor integrations. When retrieving the value for this attribute, use types.Dynamic as the value type unless the CustomType field is set.

The concrete value type for a dynamic is determined at runtime by Terraform, if defined in the configuration.

func (DynamicAttribute) ApplyTerraform5AttributePathStep

func (a DynamicAttribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep always returns an error as it is not possible to step further into a DynamicAttribute.

func (DynamicAttribute) DynamicValidators

func (a DynamicAttribute) DynamicValidators() []validator.Dynamic

DynamicValidators returns the Validators field value.

func (DynamicAttribute) Equal

Equal returns true if the given Attribute is a DynamicAttribute and all fields are equal.

func (DynamicAttribute) GetDeprecationMessage

func (a DynamicAttribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (DynamicAttribute) GetDescription

func (a DynamicAttribute) GetDescription() string

GetDescription returns the Description field value.

func (DynamicAttribute) GetMarkdownDescription

func (a DynamicAttribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (DynamicAttribute) GetType

func (a DynamicAttribute) GetType() attr.Type

GetType returns types.DynamicType or the CustomType field value if defined.

func (DynamicAttribute) IsComputed

func (a DynamicAttribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (DynamicAttribute) IsOptional

func (a DynamicAttribute) IsOptional() bool

IsOptional returns the Optional field value.

func (DynamicAttribute) IsOptionalForImport

func (a DynamicAttribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (DynamicAttribute) IsRequired

func (a DynamicAttribute) IsRequired() bool

IsRequired returns the Required field value.

func (DynamicAttribute) IsRequiredForImport

func (a DynamicAttribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (DynamicAttribute) IsSensitive

func (a DynamicAttribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ListResource schemas.

func (DynamicAttribute) IsWriteOnly

func (a DynamicAttribute) IsWriteOnly() bool

IsWriteOnly returns false as write-only attributes are not relevant to ephemeral resource schemas, as these schemas describe data that is explicitly not saved to any artifact.

type Float32Attribute

type Float32Attribute struct {
	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.Float32Type. When retrieving data, the basetypes.Float32Valuable
	// associated with this custom type must be used in place of types.Float32.
	CustomType basetypes.Float32Typable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.Float32
}

Float32Attribute represents a schema attribute that is a 32-bit floating point number. When retrieving the value for this attribute, use types.Float32 as the value type unless the CustomType field is set.

Use Int32Attribute for 32-bit integer attributes or NumberAttribute for 512-bit generic number attributes.

Terraform configurations configure this attribute using expressions that return a number or directly via a floating point value.

example_attribute = 123.45

Terraform configurations reference this attribute using the attribute name.

.example_attribute

func (Float32Attribute) ApplyTerraform5AttributePathStep

func (a Float32Attribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep always returns an error as it is not possible to step further into a Float32Attribute.

func (Float32Attribute) Equal

Equal returns true if the given Attribute is a Float32Attribute and all fields are equal.

func (Float32Attribute) Float32Validators

func (a Float32Attribute) Float32Validators() []validator.Float32

Float32Validators returns the Validators field value.

func (Float32Attribute) GetDeprecationMessage

func (a Float32Attribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (Float32Attribute) GetDescription

func (a Float32Attribute) GetDescription() string

GetDescription returns the Description field value.

func (Float32Attribute) GetMarkdownDescription

func (a Float32Attribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (Float32Attribute) GetType

func (a Float32Attribute) GetType() attr.Type

GetType returns types.Float32Type or the CustomType field value if defined.

func (Float32Attribute) IsComputed

func (a Float32Attribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (Float32Attribute) IsOptional

func (a Float32Attribute) IsOptional() bool

IsOptional returns the Optional field value.

func (Float32Attribute) IsOptionalForImport

func (a Float32Attribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (Float32Attribute) IsRequired

func (a Float32Attribute) IsRequired() bool

IsRequired returns the Required field value.

func (Float32Attribute) IsRequiredForImport

func (a Float32Attribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (Float32Attribute) IsSensitive

func (a Float32Attribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ListResource schemas.

func (Float32Attribute) IsWriteOnly

func (a Float32Attribute) IsWriteOnly() bool

IsWriteOnly returns false because it does not apply to ListResource schemas.

type Float64Attribute

type Float64Attribute struct {
	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.Float64Type. When retrieving data, the basetypes.Float64Valuable
	// associated with this custom type must be used in place of types.Float64.
	CustomType basetypes.Float64Typable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.Float64
}

Float64Attribute represents a schema attribute that is a 64-bit floating point number. When retrieving the value for this attribute, use types.Float64 as the value type unless the CustomType field is set.

Use Int64Attribute for 64-bit integer attributes or NumberAttribute for 512-bit generic number attributes.

Terraform configurations configure this attribute using expressions that return a number or directly via a floating point value.

example_attribute = 123.45

Terraform configurations reference this attribute using the attribute name.

.example_attribute

func (Float64Attribute) ApplyTerraform5AttributePathStep

func (a Float64Attribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep always returns an error as it is not possible to step further into a Float64Attribute.

func (Float64Attribute) Equal

Equal returns true if the given Attribute is a Float64Attribute and all fields are equal.

func (Float64Attribute) Float64Validators

func (a Float64Attribute) Float64Validators() []validator.Float64

Float64Validators returns the Validators field value.

func (Float64Attribute) GetDeprecationMessage

func (a Float64Attribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (Float64Attribute) GetDescription

func (a Float64Attribute) GetDescription() string

GetDescription returns the Description field value.

func (Float64Attribute) GetMarkdownDescription

func (a Float64Attribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (Float64Attribute) GetType

func (a Float64Attribute) GetType() attr.Type

GetType returns types.Float64Type or the CustomType field value if defined.

func (Float64Attribute) IsComputed

func (a Float64Attribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (Float64Attribute) IsOptional

func (a Float64Attribute) IsOptional() bool

IsOptional returns the Optional field value.

func (Float64Attribute) IsOptionalForImport

func (a Float64Attribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (Float64Attribute) IsRequired

func (a Float64Attribute) IsRequired() bool

IsRequired returns the Required field value.

func (Float64Attribute) IsRequiredForImport

func (a Float64Attribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (Float64Attribute) IsSensitive

func (a Float64Attribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ListResource schemas.

func (Float64Attribute) IsWriteOnly

func (a Float64Attribute) IsWriteOnly() bool

IsWriteOnly returns false because it does not apply to ListResource schemas.

type Int32Attribute

type Int32Attribute struct {
	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.Int32Type. When retrieving data, the basetypes.Int32Valuable
	// associated with this custom type must be used in place of types.Int32.
	CustomType basetypes.Int32Typable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.Int32
}

Int32Attribute represents a schema attribute that is a 32-bit integer. When retrieving the value for this attribute, use types.Int32 as the value type unless the CustomType field is set.

Use Float32Attribute for 32-bit floating point number attributes or NumberAttribute for 512-bit generic number attributes.

Terraform configurations configure this attribute using expressions that return a number or directly via an integer value.

example_attribute = 123

Terraform configurations reference this attribute using the attribute name.

.example_attribute

func (Int32Attribute) ApplyTerraform5AttributePathStep

func (a Int32Attribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep always returns an error as it is not possible to step further into a Int32Attribute.

func (Int32Attribute) Equal

Equal returns true if the given Attribute is a Int32Attribute and all fields are equal.

func (Int32Attribute) GetDeprecationMessage

func (a Int32Attribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (Int32Attribute) GetDescription

func (a Int32Attribute) GetDescription() string

GetDescription returns the Description field value.

func (Int32Attribute) GetMarkdownDescription

func (a Int32Attribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (Int32Attribute) GetType

func (a Int32Attribute) GetType() attr.Type

GetType returns types.Int32Type or the CustomType field value if defined.

func (Int32Attribute) Int32Validators

func (a Int32Attribute) Int32Validators() []validator.Int32

Int32Validators returns the Validators field value.

func (Int32Attribute) IsComputed

func (a Int32Attribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (Int32Attribute) IsOptional

func (a Int32Attribute) IsOptional() bool

IsOptional returns the Optional field value.

func (Int32Attribute) IsOptionalForImport

func (a Int32Attribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (Int32Attribute) IsRequired

func (a Int32Attribute) IsRequired() bool

IsRequired returns the Required field value.

func (Int32Attribute) IsRequiredForImport

func (a Int32Attribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (Int32Attribute) IsSensitive

func (a Int32Attribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ListResource schemas.

func (Int32Attribute) IsWriteOnly

func (a Int32Attribute) IsWriteOnly() bool

IsWriteOnly returns false because it does not apply to ListResource schemas.

type Int64Attribute

type Int64Attribute struct {
	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.Int64Type. When retrieving data, the basetypes.Int64Valuable
	// associated with this custom type must be used in place of types.Int64.
	CustomType basetypes.Int64Typable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.Int64
}

Int64Attribute represents a schema attribute that is a 64-bit integer. When retrieving the value for this attribute, use types.Int64 as the value type unless the CustomType field is set.

Use Float64Attribute for 64-bit floating point number attributes or NumberAttribute for 512-bit generic number attributes.

Terraform configurations configure this attribute using expressions that return a number or directly via an integer value.

example_attribute = 123

Terraform configurations reference this attribute using the attribute name.

.example_attribute

func (Int64Attribute) ApplyTerraform5AttributePathStep

func (a Int64Attribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep always returns an error as it is not possible to step further into a Int64Attribute.

func (Int64Attribute) Equal

Equal returns true if the given Attribute is a Int64Attribute and all fields are equal.

func (Int64Attribute) GetDeprecationMessage

func (a Int64Attribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (Int64Attribute) GetDescription

func (a Int64Attribute) GetDescription() string

GetDescription returns the Description field value.

func (Int64Attribute) GetMarkdownDescription

func (a Int64Attribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (Int64Attribute) GetType

func (a Int64Attribute) GetType() attr.Type

GetType returns types.Int64Type or the CustomType field value if defined.

func (Int64Attribute) Int64Validators

func (a Int64Attribute) Int64Validators() []validator.Int64

Int64Validators returns the Validators field value.

func (Int64Attribute) IsComputed

func (a Int64Attribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (Int64Attribute) IsOptional

func (a Int64Attribute) IsOptional() bool

IsOptional returns the Optional field value.

func (Int64Attribute) IsOptionalForImport

func (a Int64Attribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (Int64Attribute) IsRequired

func (a Int64Attribute) IsRequired() bool

IsRequired returns the Required field value.

func (Int64Attribute) IsRequiredForImport

func (a Int64Attribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (Int64Attribute) IsSensitive

func (a Int64Attribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ephemeral resource schemas.

func (Int64Attribute) IsWriteOnly

func (a Int64Attribute) IsWriteOnly() bool

IsWriteOnly returns false because it does not apply to ListResource schemas.

type ListAttribute

type ListAttribute struct {
	// ElementType is the type for all elements of the list. This field must be
	// set.
	//
	// Element types that contain a dynamic type (i.e. types.Dynamic) are not supported.
	// If underlying dynamic values are required, replace this attribute definition with
	// DynamicAttribute instead.
	ElementType attr.Type

	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.ListType. When retrieving data, the basetypes.ListValuable
	// associated with this custom type must be used in place of types.List.
	CustomType basetypes.ListTypable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.List
}

ListAttribute represents a schema attribute that is a list with a single element type. When retrieving the value for this attribute, use types.List as the value type unless the CustomType field is set. The ElementType field must be set.

Terraform configurations configure this attribute using expressions that return a list or directly via square brace syntax.

# list of strings
example_attribute = ["first", "second"]

Terraform configurations reference this attribute using expressions that accept a list or an element directly via square brace 0-based index syntax:

# first known element
.example_attribute[0]

func (ListAttribute) ApplyTerraform5AttributePathStep

func (a ListAttribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep returns the result of stepping into a list index or an error.

func (ListAttribute) Equal

func (a ListAttribute) Equal(o fwschema.Attribute) bool

Equal returns true if the given Attribute is a ListAttribute and all fields are equal.

func (ListAttribute) GetDeprecationMessage

func (a ListAttribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (ListAttribute) GetDescription

func (a ListAttribute) GetDescription() string

GetDescription returns the Description field value.

func (ListAttribute) GetMarkdownDescription

func (a ListAttribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (ListAttribute) GetType

func (a ListAttribute) GetType() attr.Type

GetType returns types.ListType or the CustomType field value if defined.

func (ListAttribute) IsComputed

func (a ListAttribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (ListAttribute) IsOptional

func (a ListAttribute) IsOptional() bool

IsOptional returns the Optional field value.

func (ListAttribute) IsOptionalForImport

func (a ListAttribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (ListAttribute) IsRequired

func (a ListAttribute) IsRequired() bool

IsRequired returns the Required field value.

func (ListAttribute) IsRequiredForImport

func (a ListAttribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (ListAttribute) IsSensitive

func (a ListAttribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ListResource schemas.

func (ListAttribute) IsWriteOnly

func (a ListAttribute) IsWriteOnly() bool

IsWriteOnly returns false because it does not apply to ListResource schemas.

func (ListAttribute) ListValidators

func (a ListAttribute) ListValidators() []validator.List

ListValidators returns the Validators field value.

func (ListAttribute) ValidateImplementation

ValidateImplementation contains logic for validating the provider-defined implementation of the attribute to prevent unexpected errors or panics. This logic runs during the GetProviderSchema RPC and should never include false positives.

type MapAttribute

type MapAttribute struct {
	// ElementType is the type for all elements of the map. This field must be
	// set.
	//
	// Element types that contain a dynamic type (i.e. types.Dynamic) are not supported.
	// If underlying dynamic values are required, replace this attribute definition with
	// DynamicAttribute instead.
	ElementType attr.Type

	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.MapType. When retrieving data, the basetypes.MapValuable
	// associated with this custom type must be used in place of types.Map.
	CustomType basetypes.MapTypable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.Map
}

MapAttribute represents a schema attribute that is a map with a single element type. When retrieving the value for this attribute, use types.Map as the value type unless the CustomType field is set. The ElementType field must be set.

Terraform configurations configure this attribute using expressions that return a map or directly via curly brace syntax.

# map of strings
example_attribute = {
	key1 = "first",
	key2 = "second",
}

Terraform configurations reference this attribute using expressions that accept a map or an element directly via square brace string syntax:

# key1 known element
.example_attribute["key1"]

func (MapAttribute) ApplyTerraform5AttributePathStep

func (a MapAttribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep returns the result of stepping into a map index or an error.

func (MapAttribute) Equal

func (a MapAttribute) Equal(o fwschema.Attribute) bool

Equal returns true if the given Attribute is a MapAttribute and all fields are equal.

func (MapAttribute) GetDeprecationMessage

func (a MapAttribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (MapAttribute) GetDescription

func (a MapAttribute) GetDescription() string

GetDescription returns the Description field value.

func (MapAttribute) GetMarkdownDescription

func (a MapAttribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (MapAttribute) GetType

func (a MapAttribute) GetType() attr.Type

GetType returns types.MapType or the CustomType field value if defined.

func (MapAttribute) IsComputed

func (a MapAttribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (MapAttribute) IsOptional

func (a MapAttribute) IsOptional() bool

IsOptional returns the Optional field value.

func (MapAttribute) IsOptionalForImport

func (a MapAttribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (MapAttribute) IsRequired

func (a MapAttribute) IsRequired() bool

IsRequired returns the Required field value.

func (MapAttribute) IsRequiredForImport

func (a MapAttribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (MapAttribute) IsSensitive

func (a MapAttribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ListResource schemas.

func (MapAttribute) IsWriteOnly

func (a MapAttribute) IsWriteOnly() bool

IsWriteOnly returns false because it does not apply to ListResource schemas.

func (MapAttribute) MapValidators

func (a MapAttribute) MapValidators() []validator.Map

MapValidators returns the Validators field value.

func (MapAttribute) ValidateImplementation

ValidateImplementation contains logic for validating the provider-defined implementation of the attribute to prevent unexpected errors or panics. This logic runs during the GetProviderSchema RPC and should never include false positives.

type NumberAttribute

type NumberAttribute struct {
	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.NumberType. When retrieving data, the basetypes.NumberValuable
	// associated with this custom type must be used in place of types.Number.
	CustomType basetypes.NumberTypable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.Number
}

NumberAttribute represents a schema attribute that is a generic number with up to 512 bits of floating point or integer precision. When retrieving the value for this attribute, use types.Number as the value type unless the CustomType field is set.

Use Float64Attribute for 64-bit floating point number attributes or Int64Attribute for 64-bit integer number attributes.

Terraform configurations configure this attribute using expressions that return a number or directly via a floating point or integer value.

example_attribute = 123

Terraform configurations reference this attribute using the attribute name.

.example_attribute

func (NumberAttribute) ApplyTerraform5AttributePathStep

func (a NumberAttribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep always returns an error as it is not possible to step further into a NumberAttribute.

func (NumberAttribute) Equal

Equal returns true if the given Attribute is a NumberAttribute and all fields are equal.

func (NumberAttribute) GetDeprecationMessage

func (a NumberAttribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (NumberAttribute) GetDescription

func (a NumberAttribute) GetDescription() string

GetDescription returns the Description field value.

func (NumberAttribute) GetMarkdownDescription

func (a NumberAttribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (NumberAttribute) GetType

func (a NumberAttribute) GetType() attr.Type

GetType returns types.NumberType or the CustomType field value if defined.

func (NumberAttribute) IsComputed

func (a NumberAttribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (NumberAttribute) IsOptional

func (a NumberAttribute) IsOptional() bool

IsOptional returns the Optional field value.

func (NumberAttribute) IsOptionalForImport

func (a NumberAttribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (NumberAttribute) IsRequired

func (a NumberAttribute) IsRequired() bool

IsRequired returns the Required field value.

func (NumberAttribute) IsRequiredForImport

func (a NumberAttribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (NumberAttribute) IsSensitive

func (a NumberAttribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ListResource schemas.

func (NumberAttribute) IsWriteOnly

func (a NumberAttribute) IsWriteOnly() bool

IsWriteOnly returns false because it does not apply to ListResource schemas.

func (NumberAttribute) NumberValidators

func (a NumberAttribute) NumberValidators() []validator.Number

NumberValidators returns the Validators field value.

type Schema

type Schema struct {
	// Attributes is the mapping of underlying attribute names to attribute
	// definitions.
	//
	// Names must only contain lowercase letters, numbers, and underscores.
	// Names must not collide with any Blocks names.
	Attributes map[string]Attribute

	// Blocks is the mapping of underlying block names to block definitions.
	//
	// Names must only contain lowercase letters, numbers, and underscores.
	// Names must not collide with any Attributes names.
	Blocks map[string]Block

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this resource is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this resource is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this resource. The warning diagnostic
	// summary is automatically set to "Resource Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Use examplecloud_other resource instead. This resource
	//    will be removed in the next major version of the provider."
	//  - "Remove this resource as it no longer is valid and
	//    will be removed in the next major version of the provider."
	//
	DeprecationMessage string
}

Schema defines the structure and value types of a list block. This is returned as a ListResourceSchemas map value by the GetProviderSchemas RPC.

func (Schema) ApplyTerraform5AttributePathStep

func (s Schema) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (any, error)

ApplyTerraform5AttributePathStep applies the given AttributePathStep to the schema.

func (Schema) AttributeAtPath

func (s Schema) AttributeAtPath(ctx context.Context, p path.Path) (fwschema.Attribute, diag.Diagnostics)

AttributeAtPath returns the Attribute at the passed path. If the path points to an element or attribute of a complex type, rather than to an Attribute, it will return an ErrPathInsideAtomicAttribute error.

func (Schema) AttributeAtTerraformPath

func (s Schema) AttributeAtTerraformPath(ctx context.Context, p *tftypes.AttributePath) (fwschema.Attribute, error)

AttributeAtPath returns the Attribute at the passed path. If the path points to an element or attribute of a complex type, rather than to an Attribute, it will return an ErrPathInsideAtomicAttribute error.

func (Schema) GetAttributes

func (s Schema) GetAttributes() map[string]fwschema.Attribute

GetAttributes returns the Attributes field value.

func (Schema) GetBlocks

func (s Schema) GetBlocks() map[string]fwschema.Block

GetBlocks returns the Blocks field value.

func (Schema) GetDeprecationMessage

func (s Schema) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (Schema) GetDescription

func (s Schema) GetDescription() string

GetDescription returns the Description field value.

func (Schema) GetMarkdownDescription

func (s Schema) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (Schema) GetVersion

func (s Schema) GetVersion() int64

GetVersion always returns 0 because list resource schemas cannot be versioned.

func (Schema) Type

func (s Schema) Type() attr.Type

Type returns the framework type of the schema.

func (Schema) TypeAtPath

func (s Schema) TypeAtPath(ctx context.Context, p path.Path) (attr.Type, diag.Diagnostics)

TypeAtPath returns the framework type at the given schema path.

func (Schema) TypeAtTerraformPath

func (s Schema) TypeAtTerraformPath(ctx context.Context, p *tftypes.AttributePath) (attr.Type, error)

TypeAtTerraformPath returns the framework type at the given tftypes path.

func (Schema) ValidateImplementation

func (s Schema) ValidateImplementation(ctx context.Context) diag.Diagnostics

ValidateImplementation contains logic for validating the provider-defined implementation of the schema and underlying attributes and blocks to prevent unexpected errors or panics. This logic runs during the ValidateResourceConfig RPC, or via provider-defined unit testing, and should never include false positives.

type StringAttribute

type StringAttribute struct {
	// CustomType enables the use of a custom attribute type in place of the
	// default basetypes.StringType. When retrieving data, the basetypes.StringValuable
	// associated with this custom type must be used in place of types.String.
	CustomType basetypes.StringTypable

	// Required indicates whether the practitioner must enter a value for
	// this attribute or not. Required and Optional cannot both be true.
	Required bool

	// Optional indicates whether the practitioner can choose to enter a value
	// for this attribute or not. Optional and Required cannot both be true.
	Optional bool

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this attribute is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description string

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this attribute is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription string

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this Attribute. The warning diagnostic
	// summary is automatically set to "Attribute Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Configure other_attribute instead. This attribute will be removed
	//    in the next major version of the provider."
	//  - "Remove this attribute's configuration as it no longer is used and
	//    the attribute will be removed in the next major version of the
	//    provider."
	//
	// In Terraform 1.2.7 and later, this warning diagnostic is displayed any
	// time a practitioner attempts to configure a value for this attribute and
	// certain scenarios where this attribute is referenced.
	//
	// In Terraform 1.2.6 and earlier, this warning diagnostic is only
	// displayed when the Attribute is Required or Optional, and if the
	// practitioner configuration sets the value to a known or unknown value
	// (which may eventually be null). It has no effect when the Attribute is
	// Computed-only (read-only; not Required or Optional).
	//
	// Across any Terraform version, there are no warnings raised for
	// practitioner configuration values set directly to null, as there is no
	// way for the framework to differentiate between an unset and null
	// configuration due to how Terraform sends configuration information
	// across the protocol.
	//
	// Additional information about deprecation enhancements for read-only
	// attributes can be found in:
	//
	//  - https://github.com/hashicorp/terraform/issues/7569
	//
	DeprecationMessage string

	// Validators define value validation functionality for the attribute. All
	// elements of the slice of AttributeValidator are run, regardless of any
	// previous error diagnostics.
	//
	// Many common use case validators can be found in the
	// github.com/hashicorp/terraform-plugin-framework-validators Go module.
	//
	// If the Type field points to a custom type that implements the
	// xattr.TypeWithValidate interface, the validators defined in this field
	// are run in addition to the validation defined by the type.
	Validators []validator.String
}

StringAttribute represents a schema attribute that is a string. When retrieving the value for this attribute, use types.String as the value type unless the CustomType field is set.

Terraform configurations configure this attribute using expressions that return a string or directly via double quote syntax.

example_attribute = "value"

Terraform configurations reference this attribute using the attribute name.

.example_attribute

func (StringAttribute) ApplyTerraform5AttributePathStep

func (a StringAttribute) ApplyTerraform5AttributePathStep(step tftypes.AttributePathStep) (interface{}, error)

ApplyTerraform5AttributePathStep always returns an error as it is not possible to step further into a StringAttribute.

func (StringAttribute) Equal

Equal returns true if the given Attribute is a StringAttribute and all fields are equal.

func (StringAttribute) GetDeprecationMessage

func (a StringAttribute) GetDeprecationMessage() string

GetDeprecationMessage returns the DeprecationMessage field value.

func (StringAttribute) GetDescription

func (a StringAttribute) GetDescription() string

GetDescription returns the Description field value.

func (StringAttribute) GetMarkdownDescription

func (a StringAttribute) GetMarkdownDescription() string

GetMarkdownDescription returns the MarkdownDescription field value.

func (StringAttribute) GetType

func (a StringAttribute) GetType() attr.Type

GetType returns types.StringType or the CustomType field value if defined.

func (StringAttribute) IsComputed

func (a StringAttribute) IsComputed() bool

IsComputed returns false because it does not apply to ListResource schemas.

func (StringAttribute) IsOptional

func (a StringAttribute) IsOptional() bool

IsOptional returns the Optional field value.

func (StringAttribute) IsOptionalForImport

func (a StringAttribute) IsOptionalForImport() bool

IsOptionalForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (StringAttribute) IsRequired

func (a StringAttribute) IsRequired() bool

IsRequired returns the Required field value.

func (StringAttribute) IsRequiredForImport

func (a StringAttribute) IsRequiredForImport() bool

IsRequiredForImport returns false as this behavior is only relevant for managed resource identity schema attributes.

func (StringAttribute) IsSensitive

func (a StringAttribute) IsSensitive() bool

IsSensitive returns false because it does not apply to ListResource schemas.

func (StringAttribute) IsWriteOnly

func (a StringAttribute) IsWriteOnly() bool

IsWriteOnly returns false because it does not apply to ListResource schemas.

func (StringAttribute) StringValidators

func (a StringAttribute) StringValidators() []validator.String

StringValidators returns the Validators field value.

Jump to

Keyboard shortcuts

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