-
-
Notifications
You must be signed in to change notification settings - Fork 13
feat: custom wiki usage block #235
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
feat: custom wiki usage block #235
Conversation
Thank you @polleuretan for this thoughtful contribution! I really appreciate you taking the time to implement this feature - it's a great start and addresses the need for more flexible documentation. You've identified exactly the right problem: the hardcoded usage instructions are too limiting for teams that need organization-specific examples or custom content. Your implementation with the However, I've been thinking about this in the context of issue #184, and I believe we might want to solve this in a more comprehensive way. The challenge with the current approach here is that:
My thinking is to move this logic outside of the action configuration entirely and instead pull documentation directly from each module's <!-- TERRAFORM-MODULE-RELEASER-WIKI-TEMPLATE
## Custom Module Usage
Custom text with dynamic replacements possible.
```hcl
module "my_module" {
source = "{{MODULE_SOURCE}}"
# Custom examples here
}
```
--> This approach would:
I'm leaning pretty heavily towards moving that route to provide utmost flexibility here. Curious as to your thoughts |
@virgofx thanks for calling out that the current implementation isn’t flexible enough—and for laying out such a thoughtful, comprehensive alternative. I’d like to propose a slightly different approach that keeps things simple while still giving us the dynamic power we need:
In our monorepo scenario, we’ll have dozens of modules that all share the same usage‐block pattern. By using this templating mechanism we can define the template once in our workflow configuration and have it apply consistently across all modules. Please let me know what you think so I can proceed with polishing the new approach. |
👋 @virgofx, I've implemented the refinements you mentioned above. |
Hi @polleuretan - Sorry for the delay, busy week here. Taking a look and will review! |
Thanks @polleuretan - Going to test a few more things off of |
This PR introduces a new feature that allows users to provide a custom "Usage" section for the generated wiki documentation.
Currently, the usage instructions are hardcoded, which limits customisation. This change adds a new
wiki-usage-template
input to the action.yml, enabling users to define their own usage block as a raw string.This enhancement provides greater flexibility, allowing teams to include organization-specific examples, provider configurations, or any other custom content they require in their module documentation.
Example Usage