Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support provider prefix in generated filenames #348

Closed
wants to merge 1 commit into from

Conversation

ctreatma
Copy link

This PR introduces a --use-provider-prefix flag for the tfplugindocs generate command. The flag defaults to false, in which case the command behavior around file names matches existing behavior. When the provider prefix is enabled with tfplugindocs generate --use-provider-prefix, resource and data source file names include the <providerShortName>_ prefix.

The conventional paths documentation is updated to cover default behavior and behavior with the --use-provider-prefix flag. Tests haven't been updated yet.

Closes #347

@ctreatma ctreatma requested a review from a team as a code owner March 22, 2024 21:30
@hashicorp-cla
Copy link

hashicorp-cla commented Mar 22, 2024

CLA assistant check
All committers have signed the CLA.

@SBGoods
Copy link
Contributor

SBGoods commented Mar 28, 2024

Hi @ctreatma,
Thank you for the contribution. Our general design philosophy around terraform-plugin-docs is to encourage Terraform public registry and provider ecosystem documentation best practices. The Terraform public registry documentation convention and the majority of Terraform providers on the public registry do not use a provider prefix in file names. Therefore, we are reluctant to add an option to support a provider prefix in the generate subcommand. We have decided to solve underlying issue in #349 by removing the provider prefix from filenames during the migrate command.

I will close out this PR but feel free to reach out and open another issue if you encounter anything else.

@SBGoods SBGoods closed this Mar 28, 2024
@ctreatma ctreatma deleted the configurable-paths branch March 29, 2024 14:59
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate docs are generated when template names have <provider-name>_ prefix
3 participants