the main benefit of tfplugin-codegen generate is to create the schema for the resource/data source. It generates a bunch of other functions that I haven't quite understood yet.
still have to make the data source model struct by hand. There is a way the generator can make one for you, it requires defining a data source in the generator yaml file of the form:
POC to show how we can use the code generator to make a data source for financial commitment reports in our API.
See Makefile.
Learnings:
scaffold
command is useful for making the boilerplate code. From there, you'll need to edit it a bit so that it works. Usage:tfplugin-codegen generate
is to create the schema for the resource/data source. It generates a bunch of other functions that I haven't quite understood yet.which creates a file containing the struct. I didnt think it was worth the effort though.