---
page_title: 'Plugin Development - Framework: Attributes'
description: >-
  Learn the attribute types in the provider development framework. Attributes
  are fields in a resource, data source, or provider schema.
---

# Attributes

Attributes are value storing fields in resource, data source, or provider [schemas](/terraform/plugin/framework/handling-data/schemas). Every attribute has an associated [value type](/terraform/plugin/framework/handling-data/types), which describes the kind of data the attribute can hold. Attributes also can describe value plan modifiers (resources only) and value validators in addition to those defined by the value type.

## Available Attribute Types

Schemas support the following attribute types:

- [Primitive](#primitive-attribute-types): Attribute that contains a single value, such as a boolean, number, or string.
- [Collection](#collection-attribute-types): Attribute that contains multiple values of a single element type, such as a list, map, or set.
- [Nested](#nested-attribute-types): Attribute that defines a structure of explicit attibute names to attribute definitions, potentially with a wrapping collection type, such as a single structure of attributes or a list of structures of attributes.
- [Object](#object-attribute-type): Attribute that defines a structure of explicit attribute names to type-only definitions.
- [Dynamic](#dynamic-attribute-type): Attribute that accepts any value type.

### Primitive Attribute Types

Attribute types that contain a single data value, such as a boolean, number, or string.

| Attribute Type | Use Case |
|----------------|----------|
| [Bool](/terraform/plugin/framework/handling-data/attributes/bool) | Boolean true or false |
| [Float32](/terraform/plugin/framework/handling-data/attributes/float32) | 32-bit floating point number |
| [Float64](/terraform/plugin/framework/handling-data/attributes/float64) | 64-bit floating point number |
| [Int32](/terraform/plugin/framework/handling-data/attributes/int32) | 32-bit integer number |
| [Int64](/terraform/plugin/framework/handling-data/attributes/int64) | 64-bit integer number |
| [Number](/terraform/plugin/framework/handling-data/attributes/number) | Arbitrary precision (generally over 64-bit, up to 512-bit) number |
| [String](/terraform/plugin/framework/handling-data/attributes/string) | Collection of UTF-8 encoded characters |

### Collection Attribute Types

Attribute types that contain multiple values of a single element type, such as a list, map, or set.

| Attribute Type | Use Case |
|----------------|----------|
| [List](/terraform/plugin/framework/handling-data/attributes/list) | Ordered collection of single element type |
| [Map](/terraform/plugin/framework/handling-data/attributes/map) | Mapping of arbitrary string keys to values of single element type |
| [Set](/terraform/plugin/framework/handling-data/attributes/set) | Unordered, unique collection of single element type |

### Nested Attribute Types

<Highlight>

Only supported when using [protocol version 6](/terraform/plugin/framework/provider-servers).

</Highlight>

Attribute types that define a structure of explicit attibute names to attribute definitions, potentially with a wrapping collection type, such as a single structure of attributes or a list of structures of attributes.

| Attribute Type | Use Case |
|----------------|----------|
| [List Nested](/terraform/plugin/framework/handling-data/attributes/list-nested) | Ordered collection of structures of attributes |
| [Map Nested](/terraform/plugin/framework/handling-data/attributes/map-nested) | Mapping of arbitrary string keys to structures of attributes |
| [Set Nested](/terraform/plugin/framework/handling-data/attributes/set-nested) | Unordered, unique collection of structures of attributes |
| [Single Nested](/terraform/plugin/framework/handling-data/attributes/single-nested) | Single structure of attributes |

### Object Attribute Type

<Tip>

Use [nested attribute types](#nested-attribute-types) where possible. Objects have limited capabilities.

</Tip>

Attribute type that defines a structure of explicit attribute names to type-only definitions.

| Attribute Type | Use Case |
|----------------|----------|
| [Object](/terraform/plugin/framework/handling-data/attributes/object) | Single structure mapping explicit attribute names to type definitions |

### Dynamic Attribute Type

<Tip>

Static attribute types should always be preferred over dynamic attribute types, when possible.

Developers dealing with dynamic attribute data will need to have extensive knowledge of the [Terraform type system](/terraform/language/expressions/types) to properly handle all potential practitioner configuration scenarios.

Refer to [Dynamic Data - Considerations](/terraform/plugin/framework/handling-data/dynamic-data#considerations) for more information.

</Tip>

Attribute type that can be any value type, determined by Terraform or the provider at runtime.

| Attribute Type | Use Case |
|----------------|----------|
| [Dynamic](/terraform/plugin/framework/handling-data/attributes/dynamic) | Any value type of data, determined at runtime. |