-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add option to ignore deprecated resources and data-sources #154
Conversation
i've got no weighing on review of this so take it with a grain of salt however, this seems like an antipattern to be using. if a resource is being deprecated, i would expect the documentation to stick around until it is removed in which case, you can then delete the resource and the documentation goes with it; no need for a new flag. to help the maintainers, could you elaborate a little on your use case? |
I'm migrating https://github.com/hashicorp/terraform-provider-consul to use this tool and we have a few resources that have been deprecated for ages but kept to simplify things for users. They have been aliased to the new resources but have not been documented for a long time. I would like to keep things this way to avoid suddenly adding resources in the doc that have not been used, and to be able to keep things as they were. I understand that this is quite a specific use case and I'm happy to use a personal fork if this is not accepted. |
gotcha, so it's actually the reverse of what i thought 😅 undocumented resources that you don't want to see in the generated output as opposed to removing them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @remilapeyre - thanks for this PR. I think, while nichè, this is a legit scenario that a provider with lots of existing users might want to use.
I think only 2 things are missing here to be merged:
- adding an entry to the CHANGELOG describing the new feature
- you are not applying the ignore logic to the
provider content
, last part of therenderMissingDocs
method ininternal/provider/generate
package: https://github.com/hashicorp/terraform-plugin-docs/blob/main/internal/provider/generate.go#L347
Once that is handled, we can probably merge this.
Thank you for this contribution.
A recent bug-fix PR by @jacobbednarz has gone in, so adding en entry to the CHANGELOG should be a bit easier. Staying tuned as I'd be keen to release this and the other PR. |
Hi, I will update this tonight. |
Hi @detro, I'm not sure what is expected for |
Oh, sorry @remilapeyre - I was probably tired the other day and misread the code. Yes, there is nothing to add for provider (not like one can deprecate a provider). But we do still need an entry in the CHANGELOG. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
@remilapeyre @jacobbednarz I'll now be working on releasing this. I'm thinking I should add a print out of a |
And thank you so much to both |
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. |
No description provided.