hashicorp / hashicorp/terraform-plugin-framework

Expand Default Value Handling Documentation for Nested Attributes

Open
#939 0 comments 1 reaction 0 assignees View on GitHub
documentation
Dominant language
Go
Stars
384
Forks
107
Avg merge
3m
Merged PRs (30d)
1

Description

### Module version

```
v1.6.0
```

### Use-cases

Provider developers encountering Terraform Provider development, or the framework schema/type system, for the first time may want to introduce default value handling for managed resource schemas. Especially when working with collection-based nested attributes, the current website documentation only mentions the common use case `StaticValue()` default value functions, but no implementation details about how to do so.

### Proposal

On pages such as https://developer.hashicorp.com/terraform/plugin/framework/handling-data/attributes/list-nested, in the Plan Modification section, expand the default documentation a bit more with a real-world code example, or at least give some additional details that (in that specific case) the `StaticValue()` function should be passed a `types.List` of `types.Object` of the nested attributes that match the schema definition.

### References

- https://github.com/hashicorp/terraform-plugin-framework/issues/930

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.