Skip to content

Commit

Permalink
feat: add apprise notification
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuochi committed May 17, 2023
1 parent 777c6a6 commit d84faec
Show file tree
Hide file tree
Showing 13 changed files with 643 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/data-sources/notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ data "radarr_notification" "example" {
- `api_key` (String) API key.
- `app_token` (String) App token.
- `arguments` (String) Arguments.
- `auth_password` (String, Sensitive) Password.
- `auth_token` (String) Auth token.
- `auth_user` (String) Auth user.
- `auth_username` (String) Username.
- `author` (String) Author.
- `avatar` (String) Avatar.
- `bcc` (Set of String) Bcc.
Expand All @@ -46,6 +48,7 @@ data "radarr_notification" "example" {
- `clean_library` (Boolean) Clean library flag.
- `click_url` (String) Click URL.
- `config_contract` (String) Notification configuration template.
- `configuration_key` (String, Sensitive) Configuration key.
- `consumer_key` (String) Consumer key.
- `consumer_secret` (String) Consumer secret.
- `device_ids` (Set of String) Device IDs.
Expand All @@ -71,6 +74,7 @@ data "radarr_notification" "example" {
- `map_to` (String) Map To.
- `mention` (String) Mention.
- `method` (Number) Method. `1` POST, `2` PUT.
- `notification_type` (Number) Notification type. `0` Info, `1` Success, `2` Warning, `3` Failure.
- `notify` (Boolean) Notify flag.
- `on_application_update` (Boolean) On application update flag.
- `on_download` (Boolean) On download flag.
Expand Down Expand Up @@ -99,6 +103,7 @@ data "radarr_notification" "example" {
- `server_url` (String) Server url.
- `sign_in` (String) Sign in.
- `sound` (String) Sound.
- `stateless_urls` (String) Stateless URLs.
- `tags` (Set of Number) List of associated tags.
- `to` (Set of String) To.
- `token` (String) Token.
Expand Down
5 changes: 5 additions & 0 deletions docs/data-sources/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ Read-Only:
- `api_key` (String) API key.
- `app_token` (String) App token.
- `arguments` (String) Arguments.
- `auth_password` (String, Sensitive) Password.
- `auth_token` (String) Auth token.
- `auth_user` (String) Auth user.
- `auth_username` (String) Username.
- `author` (String) Author.
- `avatar` (String) Avatar.
- `bcc` (Set of String) Bcc.
Expand All @@ -49,6 +51,7 @@ Read-Only:
- `clean_library` (Boolean) Clean library flag.
- `click_url` (String) Click URL.
- `config_contract` (String) Notification configuration template.
- `configuration_key` (String, Sensitive) Configuration key.
- `consumer_key` (String) Consumer key.
- `consumer_secret` (String) Consumer secret.
- `device_ids` (Set of String) Device IDs.
Expand All @@ -75,6 +78,7 @@ Read-Only:
- `mention` (String) Mention.
- `method` (Number) Method. `1` POST, `2` PUT.
- `name` (String) Notification name.
- `notification_type` (Number) Notification type. `0` Info, `1` Success, `2` Warning, `3` Failure.
- `notify` (Boolean) Notify flag.
- `on_application_update` (Boolean) On application update flag.
- `on_download` (Boolean) On download flag.
Expand Down Expand Up @@ -103,6 +107,7 @@ Read-Only:
- `server_url` (String) Server url.
- `sign_in` (String) Sign in.
- `sound` (String) Sound.
- `stateless_urls` (String) Stateless URLs.
- `tags` (Set of Number) List of associated tags.
- `to` (Set of String) To.
- `token` (String) Token.
Expand Down
5 changes: 5 additions & 0 deletions docs/resources/notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ resource "radarr_notification" "example" {
- `api_key` (String) API key.
- `app_token` (String) App token.
- `arguments` (String) Arguments.
- `auth_password` (String, Sensitive) Password.
- `auth_token` (String) Auth token.
- `auth_user` (String) Auth user.
- `auth_username` (String) Username.
- `author` (String) Author.
- `avatar` (String) Avatar.
- `bcc` (Set of String) Bcc.
Expand All @@ -67,6 +69,7 @@ resource "radarr_notification" "example" {
- `chat_id` (String) Chat ID.
- `clean_library` (Boolean) Clean library flag.
- `click_url` (String) Click URL.
- `configuration_key` (String, Sensitive) Configuration key.
- `consumer_key` (String) Consumer key.
- `consumer_secret` (String) Consumer secret.
- `device_ids` (Set of String) Device IDs.
Expand All @@ -90,6 +93,7 @@ resource "radarr_notification" "example" {
- `map_to` (String) Map To.
- `mention` (String) Mention.
- `method` (Number) Method. `1` POST, `2` PUT.
- `notification_type` (Number) Notification type. `0` Info, `1` Success, `2` Warning, `3` Failure.
- `notify` (Boolean) Notify flag.
- `on_application_update` (Boolean) On application update flag.
- `on_download` (Boolean) On download flag.
Expand Down Expand Up @@ -117,6 +121,7 @@ resource "radarr_notification" "example" {
- `server_url` (String) Server url.
- `sign_in` (String) Sign in.
- `sound` (String) Sound.
- `stateless_urls` (String) Stateless URLs.
- `tags` (Set of Number) List of associated tags.
- `to` (Set of String) To.
- `token` (String) Token.
Expand Down
81 changes: 81 additions & 0 deletions docs/resources/notification_apprise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "radarr_notification_apprise Resource - terraform-provider-radarr"
subcategory: "Notifications"
description: |-
Notification Apprise resource.
For more information refer to Notification https://wiki.servarr.com/radarr/settings#connect and Apprise https://wiki.servarr.com/radarr/supported#apprise.
---

# radarr_notification_apprise (Resource)

<!-- subcategory:Notifications -->Notification Apprise resource.
For more information refer to [Notification](https://wiki.servarr.com/radarr/settings#connect) and [Apprise](https://wiki.servarr.com/radarr/supported#apprise).

## Example Usage

```terraform
resource "radarr_notification_apprise" "example" {
on_grab = false
on_download = true
on_upgrade = true
on_movie_added = false
on_movie_delete = false
on_movie_file_delete = false
on_movie_file_delete_for_upgrade = true
on_health_issue = false
on_application_update = false
include_health_warnings = false
name = "Example"
notification_type = 1
server_url = "https://apprise.go"
auth_username = "User"
auth_password = "Password"
field_tags = ["warning", "skull"]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) NotificationBoxcar name.
- `on_movie_delete` (Boolean) On movie delete flag.
- `server_url` (String) Server URL.

### Optional

- `auth_password` (String, Sensitive) Password.
- `auth_username` (String) Username.
- `configuration_key` (String, Sensitive) Configuration key.
- `field_tags` (Set of String) Tags and emojis.
- `include_health_warnings` (Boolean) Include health warnings.
- `notification_type` (Number) Notification type. `0` Info, `1` Success, `2` Warning, `3` Failure.
- `on_application_update` (Boolean) On application update flag.
- `on_download` (Boolean) On download flag.
- `on_grab` (Boolean) On grab flag.
- `on_health_issue` (Boolean) On health issue flag.
- `on_health_restored` (Boolean) On health restored flag.
- `on_manual_interaction_required` (Boolean) On manual interaction required flag.
- `on_movie_added` (Boolean) On movie added flag.
- `on_movie_file_delete` (Boolean) On movie file delete flag.
- `on_movie_file_delete_for_upgrade` (Boolean) On movie file delete for upgrade flag.
- `on_upgrade` (Boolean) On upgrade flag.
- `stateless_urls` (String) Stateless URLs.
- `tags` (Set of Number) List of associated tags.

### Read-Only

- `id` (Number) Notification ID.

## Import

Import is supported using the following syntax:

```shell
# import using the API/UI ID
terraform import radarr_notification_apprise.example 1
```
2 changes: 2 additions & 0 deletions examples/resources/radarr_notification_apprise/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# import using the API/UI ID
terraform import radarr_notification_apprise.example 1
20 changes: 20 additions & 0 deletions examples/resources/radarr_notification_apprise/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
resource "radarr_notification_apprise" "example" {
on_grab = false
on_download = true
on_upgrade = true
on_movie_added = false
on_movie_delete = false
on_movie_file_delete = false
on_movie_file_delete_for_upgrade = true
on_health_issue = false
on_application_update = false

include_health_warnings = false
name = "Example"

notification_type = 1
server_url = "https://apprise.go"
auth_username = "User"
auth_password = "Password"
field_tags = ["warning", "skull"]
}
Loading

0 comments on commit d84faec

Please sign in to comment.