hashicorp / hashicorp/terraform-plugin-sdk
List ResourceData Keys and set Values.
- Dominant language
- Go
- Stars
- 485
- Forks
- 244
- Avg merge
- 19h 57m
- Merged PRs (30d)
- 4
Description
### SDK version
```
github.com/hashicorp/terraform-plugin-sdk/v2 v2.4.4
```
### Use-cases
I would like to copy all the values ("set" values) from a ResourceData to an internal struct.
At the moment you can call `Get` or `GetOk`. Instead, I would like a list of all these values.
### Attempted Solutions
```
One thought I had was to access the `schema` field in the ResourceData.
However, it's private and there is no getter.
```
### Proposal
Something like:
```
type ResourceDataAttr struct {
Key string
Value interface{}
}
func (*ResourceData) GetAll() []ResourceDataAttr {
...
}
or
func (*ResourceData) GetSchema() *schema.Schema {
...
}
```
### References
None at the moment.
Contributor guide
Assessment
This issue has not been assessed yet.