Skip to content

Commit 08047be

Browse files
authored
docs: Use arbitrary with map keys and explicit with object attribute names (#807)
Reference: #805
1 parent 373a6b3 commit 08047be

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

website/docs/plugin/framework/handling-data/attributes.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ The framework provides a standard set of schema attribute types that are based o
7373
| `number` | `schema.Float64Attribute` | `types.Float64` | `float64` | 64-bit floating point number |
7474
| `number` | `schema.Int64Attribute` | `types.Int64` | `int64` | 64-bit integer |
7575
| `list` | `schema.ListAttribute` | `types.List` | `[]attr.Value` | Ordered collection of single element type |
76-
| `map` | `schema.MapAttribute` | `types.Map` | `map[string]attr.Value` | Mapping of string keys to single element type |
76+
| `map` | `schema.MapAttribute` | `types.Map` | `map[string]attr.Value` | Mapping of arbitrary string keys to single element type |
7777
| `number` | `schema.NumberAttribute` | `types.Number` | `*big.Float` | Large floating point or number |
78-
| `object` | `schema.ObjectAttribute` | `types.Object` | `map[string]attr.Value` | Structure mapping string attibute keys to any value type |
78+
| `object` | `schema.ObjectAttribute` | `types.Object` | `map[string]attr.Value` | Structure mapping explicit string attibute keys to any value type |
7979
| `set` | `schema.SetAttribute` | `types.Set` | `[]attr.Value` | Unordered, unique collection of single element type |
8080
| `string` | `schema.StringAttribute` | `types.String` | `string` | Collection of UTF-8 encoded characters |
8181

@@ -281,9 +281,9 @@ Call one of the following to create a `types.List`:
281281

282282
### Map
283283

284-
Maps are mappings of string keys to values of a single element type.
284+
Maps are mappings of arbitrary string keys to values of a single element type.
285285

286-
-> Use [Map Nested Attributes](/terraform/plugin/framework/handling-data/attributes#mapnestedattribute) for maps of objects that need additional schema information. Use [Object](#object) for structures of string attribute names to any value.
286+
-> Use [Map Nested Attributes](/terraform/plugin/framework/handling-data/attributes#mapnestedattribute) for maps of objects that need additional schema information. Use [Object](#object) for structures of explicit string attribute names to any value.
287287

288288
Given an example Terraform configuration that sets a map of string values to the `example_attribute` attribute:
289289

@@ -323,9 +323,9 @@ Call one of the following to create a `types.Map`:
323323

324324
### Object
325325

326-
Objects are mappings of string attribute names to values of any type. Objects must always declare all attribute values, even when those attributes are null or unknown, unless the entire object is null or unknown.
326+
Objects are mappings of explicit string attribute names to values of any type. Objects must always declare all attribute values, even when those attributes are null or unknown, unless the entire object is null or unknown.
327327

328-
-> Use [Single Nested Attributes](/terraform/plugin/framework/handling-data/attributes#singlenestedattribute) for objects that need additional schema information. Use [Map](#map) for mappings of string keys to a single element type.
328+
-> Use [Single Nested Attributes](/terraform/plugin/framework/handling-data/attributes#singlenestedattribute) for objects that need additional schema information. Use [Map](#map) for mappings of arbitrary string keys to a single element type.
329329

330330
Given an example Terraform configuration that sets a map of string values to the `example_attribute` attribute:
331331

0 commit comments

Comments
 (0)