-
Notifications
You must be signed in to change notification settings - Fork 5k
Contributor Docs: add provider documentation standards page #28611
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8acee93
Add documentation standards page
sreallymatt 0ccec1c
Adding examples of inconsistencies and expected format
sreallymatt ea17c5c
casing > capatlisation for clarity
sreallymatt f9ad8a4
Add paragraph on breaking changes notes
sreallymatt fa00c10
Add newline for consistency
sreallymatt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Provider Documentation Standards | ||
| <!-- TODO: Should this be a single page, or prefer to split this into multiple? (e.g. docs-notes.md) --> | ||
| In an effort to keep the [provider documentation](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs) consistent, this page documents some standards that have been agreed on. | ||
|
|
||
| This page will grow over time, and suggestions are welcome! | ||
|
|
||
| ## Notes | ||
|
|
||
| Note blocks are used to provide additional information to users beyond the basic description of a resource, argument or attribute. | ||
|
|
||
| <!-- | ||
| - TODO: Considerations for when to add notes? We probably don't want to overdo it (More relevant to informational notes) | ||
| - TODO: Casing (Note vs NOTE) | ||
| --> | ||
|
sreallymatt marked this conversation as resolved.
|
||
|
|
||
| ### Informational Note | ||
|
|
||
| Informational note blocks should generally be used when a note provides additional useful information, recommendations and/or tips to the user. | ||
|
|
||
| To add an informational note, use `-> **Note:**`, within the Terraform registry documentation this will template as a block with an info icon. | ||
|
|
||
| For example, extra information on the supported values for an argument, possibly linking to external documentation for the resource/service: | ||
|
|
||
| ```markdown | ||
| * `type` - (Required) The type. Possible values include `This`, `That`, and `Other`. | ||
|
|
||
| -> **Note:** More information on each of the supported types can be found in [type documentation](link-to-additional-info) | ||
| ``` | ||
|
|
||
| ### Warning Note | ||
|
|
||
| Warning note blocks should generally be used when a note provides information that the user will need to avoid certain errors, however if these errors are encountered they should not break anything or cause irreversible changes. | ||
|
|
||
| To add a warning note, use `~> **Note:**`, within the Terraform registry documentation this will template as a block with a warning icon. | ||
|
|
||
| For example, an argument that is optional but required when another argument is set to `true`: | ||
|
|
||
| ```markdown | ||
| * `optional_argument_enabled` - (Optional) Is the optional argument enabled? Defaults to `false`. | ||
|
|
||
| * `optional_argument` - (Optional) An optional argument. | ||
|
|
||
| ~> **Note:** The argument `optional_argument` is required when `optional_argument_enabled` is set to `true`. | ||
| ``` | ||
|
|
||
| ### Caution Note | ||
|
|
||
| Caution note blocks should generally be used when a note provides critical information on potential irreversible changes, data loss or other things that can negatively affect a user's environment. | ||
|
|
||
| To add a caution note, use `!> **Note:**`, within the Terraform registry documentation this will template as a block with a caution icon. | ||
|
|
||
| For example, an argument that when set to `true` cannot be reversed without recreating the resource: | ||
|
|
||
| ```markdown | ||
| * `irreversible_argument_enabled` - (Optional) Is irreversible argument enabled? Defaults to `false`. | ||
|
|
||
| !> **Note:** The argument `irreversible_argument_enabled` cannot be disabled after being enabled. | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.