Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Default Value Handling Documentation for Nested Attributes #939

Open
bflad opened this issue Feb 29, 2024 · 0 comments
Open

Expand Default Value Handling Documentation for Nested Attributes #939

bflad opened this issue Feb 29, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@bflad
Copy link
Member

bflad commented Feb 29, 2024

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

@bflad bflad added the documentation Improvements or additions to documentation label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant