-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit introduces templates for generating provider documentation. There's also a new generic resource page with information regarding all resources, including the ones we do not support in the provider (SLO annotations and Alert Silences)
- Loading branch information
Showing
58 changed files
with
1,073 additions
and
276 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,37 @@ | ||
# Documentation | ||
|
||
[Official Terraform Provider Documentation](https://www.terraform.io/registry/providers/docs) | ||
|
||
This section provides all the information needed to work with `terraform-provider-nobl9` documentation. | ||
|
||
## Tool | ||
|
||
Documentation is created using the [tfplugindocs](https://github.com/hashicorp/terraform-plugin-docs) tool. | ||
|
||
## Which files should I change? | ||
|
||
- Update (if needed) templates available under `templates/` directory | ||
- Each resource has a separate template file, ex. `templates/resources/slo.md.tmpl` | ||
- We use generic templates for index and resource pages: `templates/index.md.tmpl` and `templates/resources.md.tmpl` | ||
- Use Data Fields supported by tfplugindocs - https://github.com/hashicorp/terraform-plugin-docs | ||
- Update (if needed) examples available under `examples/` directory | ||
- Make sure that all examples are working with the latest version of the provider | ||
- `examples/provider/provider.tf` is the example that will be rendered on the main page on [provider documentation](https://registry.terraform.io/providers/nobl9/nobl9/latest/docs#schema) | ||
- `examples/resources/<resource_name>/resource.tf` will be rendered for every resource on their documentation page, ex. https://registry.terraform.io/providers/nobl9/nobl9/latest/docs/resources/slo | ||
- Update (if needed) `"description"` field for a resource, ex. in `nobl9/resource_slo.go`: | ||
``` | ||
Schema: map[string]*schema.Schema{ | ||
... | ||
"description": "Your new description" | ||
... | ||
} | ||
``` | ||
- This description will be rendered on the documentation page for the changed resource. | ||
- Do not touch anything under `docs/` directory. | ||
|
||
## How to generate docs? | ||
|
||
You need to have [Go](https://go.dev/) installed on your machine, then run: | ||
``` | ||
go generate | ||
``` |
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,33 +1,50 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "nobl9_alert_method_discord Resource - terraform-provider-nobl9" | ||
subcategory: "" | ||
subcategory: "Alert Methods" | ||
description: |- | ||
Integration configuration documentation https://docs.nobl9.com/Alert_Methods/discord | ||
Discord Alert Method | Nobl9 Documentation https://docs.nobl9.com/Alert_Methods/discord | ||
--- | ||
|
||
# nobl9_alert_method_discord (Resource) | ||
|
||
[Integration configuration documentation](https://docs.nobl9.com/Alert_Methods/discord) | ||
The **Discord Alert Method** enables sending alerts through Discord to notify Nobl9 users whenever an incident is triggered. | ||
|
||
For more details, refer to [Discord Alert Method | Nobl9 Documentation](https://docs.nobl9.com/Alert_Methods/discord). | ||
|
||
## Example Usage | ||
|
||
Here's an example of Discord Terraform resource configuration: | ||
|
||
```terraform | ||
resource "nobl9_alert_method_discord" "this" { | ||
name = "my-discord-alert" | ||
display_name = "My Discord alert" | ||
project = "My Discord alert" | ||
description = "My Discord alert method" | ||
url = "https://discord.webhook.url" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Unique name of the resource. Must match [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). | ||
- `project` (String) Name of the project the resource is in. Must match [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). | ||
- `name` (String) Unique name of the resource, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). | ||
- `project` (String) Name of the Nobl9 project the resource sits in, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). | ||
|
||
### Optional | ||
|
||
- `description` (String) Optional description of the resource. | ||
- `display_name` (String) Display name of the resource. | ||
- `url` (String, Sensitive) Discord webhook endpoint URL. | ||
- `description` (String) Optional description of the resource. Here, you can add details about who is responsible for the integration (team/owner) or the purpose of creating it. | ||
- `display_name` (String) User-friendly display name of the resource. | ||
- `url` (String, Sensitive) Discord webhook endpoint URL. Refer to [Intro to webhooks | Discord documentation](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) for more details. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
## Useful Links | ||
|
||
[Discord alerts configuration | Nobl9 Documentation](https://docs.nobl9.com/Alert_Methods/discord/) | ||
|
||
[Intro to webhooks | Discord Documentation](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) |
Oops, something went wrong.