-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Duplicate docs are generated when template names have <provider-name>_
prefix
#347
Comments
Hi @ctreatma 👋 Thank you for reporting this and sorry you ran into trouble here. I can reproduce this behavior via: gh repo clone equinix/terraform-provider-equinix
cd terraform-provider-equinix
tfplugindocs migrate
go generate ./...
git status I'm guessing there are at least two mutually exclusive options here:
Adjusting the |
When you refer to the "expected" location, which file path format are you referring to? Based on the documentation of conventional paths, I think the expected path is the one with the provider prefix (e.g., My aim would be to keep the provider prefix so that the docs don't move as a result of adopting docs generation: in the event that someone has bookmarked the existing pages I'd like to avoid throwing 404s and leaving them to find the page again. Would it be possible/feasible to add a flag to |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform CLI and terraform-plugin-docs Versions
Provider Code
Expected Behavior
The generator creates one Markdown page per resource or data source
Actual Behavior
The generator creates two Markdown pages per resource or data source: one page has the provider name prefix in the file name and the other does not
Steps to Reproduce
caller_identity
in theaws
provider would be namedaws_caller_identity.md.tmpl
)tfplugindocs --generate
I'm using
tfplugindocs --migrate
to create templates from existing docs; it produces the expected templates that have the conventional path with the provider name prefix.The generator produces files that match the template names and have the expected contents, but it also produces files without the provider name prefix that use a default template.
Note: I confirmed that if I remove the provider prefix from the template files I only get the files without the provider name prefix, but I want to get one set of generated files that has the conventional path with the provider name prefix.
How much impact is this issue causing?
High
Logs
No response
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: