hashicorp / hashicorp/terraform-plugin-framework
Add support in basetypes for ListValues.ElementsValuePointer
- Dominant language
- Go
- Stars
- 384
- Forks
- 107
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
### Module version
```
github.com/hashicorp/terraform-plugin-framework v1.16.1
```
### Use-cases
When I'm in an update function, I sometimes have to deal with `*[]string` for a particular attribute in an update request.
It would be helpful to have a way right from `types.List` to have something ready to be written inside the type.
### Attempted Solutions
I can have ad-hoc conversions inside the code of the update but it seems cumbersome to do it for all the different pointer on slice that have to be handled.
### Proposal
Add to the `types.List` a method to have a pointer on this list of element. A little bit similar to what exist for a string: `ValueStringPointer()`.
### References
- https://github.com/hashicorp/terraform-plugin-framework/blob/main/types/list_value.go
- https://github.com/hashicorp/terraform-plugin-framework/blob/main/types/basetypes/list_value.go
Contributor guide
Assessment
This issue has not been assessed yet.