You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run terraform-plugin-docs migrate, the templates and examples that are created should align with the documented conventional paths.
This means that template files should be created in, e.g., templates/resources/myresource.md.tmpl (no provider name prefix)
and that example files should be created in, e.g., examples/resources/myprovider_myresource/example1.tf (including the provider name prefix).
Actual Behavior
Template files are created in, e.g., templates/resources/myresource.md.tmpl as expected
Example files are created in, e.g., examples/resources/myresource/example1.tf.
It makes sense to me that none of the paths would include the provider prefix, but the issue is that the canonical paths for examples include the provider prefix, which leads to confusion if you try to reduce your use of custom templates after migrating. The default template expects the examples to be in examples/resources/myprovider_myresource, and it's easy to miss the note that <resource_name> includes the provider prefix in the case of (some) example paths, in which case your regenerated docs don't include examples any more.
If tfplugindocs migrate created example files in directories named examples/myprovider_myresource instead of examples/myresource, that would reduce the gap between migrated docs and canonical paths. However, it would be nice if the provider prefix were omitted consistently instead of being included only for certain files. If that is not possible for some reason, it would be helpful for the docs to be more explicit by documenting that, e.g., the conventional path for a resource example is examples/resources/<provider name>_<resource name>/resource.tf instead of having a separate note explaining which of the example paths include the provider name prefix.
Steps to Reproduce
tfplugindocs migrate
How much impact is this issue causing?
Low
Logs
No response
Additional Information
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Terraform CLI and terraform-plugin-docs Versions
terraform v1.8.1
terraform-plugin-docs v0.19.4
Provider Code
Expected Behavior
When I run
terraform-plugin-docs migrate
, the templates and examples that are created should align with the documented conventional paths.This means that template files should be created in, e.g.,
templates/resources/myresource.md.tmpl
(no provider name prefix)and that example files should be created in, e.g.,
examples/resources/myprovider_myresource/example1.tf
(including the provider name prefix).Actual Behavior
Template files are created in, e.g.,
templates/resources/myresource.md.tmpl
as expectedExample files are created in, e.g.,
examples/resources/myresource/example1.tf
.It makes sense to me that none of the paths would include the provider prefix, but the issue is that the canonical paths for examples include the provider prefix, which leads to confusion if you try to reduce your use of custom templates after migrating. The default template expects the examples to be in
examples/resources/myprovider_myresource
, and it's easy to miss the note that<resource_name>
includes the provider prefix in the case of (some) example paths, in which case your regenerated docs don't include examples any more.If
tfplugindocs migrate
created example files in directories namedexamples/myprovider_myresource
instead ofexamples/myresource
, that would reduce the gap between migrated docs and canonical paths. However, it would be nice if the provider prefix were omitted consistently instead of being included only for certain files. If that is not possible for some reason, it would be helpful for the docs to be more explicit by documenting that, e.g., the conventional path for a resource example isexamples/resources/<provider name>_<resource name>/resource.tf
instead of having a separate note explaining which of the example paths include the provider name prefix.Steps to Reproduce
tfplugindocs migrate
How much impact is this issue causing?
Low
Logs
No response
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: