Skip to content

Commit

Permalink
feat: add movie resource
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuochi committed Jan 23, 2023
1 parent e8962f1 commit 04b1f95
Show file tree
Hide file tree
Showing 6 changed files with 489 additions and 0 deletions.
77 changes: 77 additions & 0 deletions docs/resources/movie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "radarr_movie Resource - terraform-provider-radarr"
subcategory: "Movies"
description: |-
Movie resource.
For more information refer to Movies https://wiki.servarr.com/radarr/library#movies documentation.
---

# radarr_movie (Resource)

<!-- subcategory:Movies -->Movie resource.
For more information refer to [Movies](https://wiki.servarr.com/radarr/library#movies) documentation.

## Example Usage

```terraform
resource "radarr_movie" "example" {
monitored = false
title = "The Matrix"
path = "/movies/The_Matrix_1999"
quality_profile_id = 1
tmdb_id = 603
minimum_availability = "inCinemas"
}
```

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

### Required

- `monitored` (Boolean) Monitored flag.
- `path` (String) Full movie path.
- `quality_profile_id` (Number) Quality profile ID.
- `title` (String) Movie title.
- `tmdb_id` (Number) TMDB ID.

### Optional

- `minimum_availability` (String) Minimum availability.
Allowed values: 'tba', 'announced', 'inCinemas', 'released', 'deleted'.
- `tags` (Set of Number) List of associated tags.

### Read-Only

- `genres` (Set of String) List genres.
- `id` (Number) Movie ID.
- `imdb_id` (String) IMDB ID.
- `is_available` (Boolean) Availability flag.
- `original_language` (Attributes) Original language. (see [below for nested schema](#nestedatt--original_language))
- `original_title` (String) Movie original title.
- `overview` (String) Overview.
- `status` (String) Movie status.
- `website` (String) Website.
- `year` (Number) Year.
- `youtube_trailer_id` (String) Youtube trailer ID.

<a id="nestedatt--original_language"></a>
### Nested Schema for `original_language`

Required:

- `id` (Number) ID.

Optional:

- `name` (String) Name.

## Import

Import is supported using the following syntax:

```shell
# import using the API/UI ID
terraform import radarr_movie.example 10
```
2 changes: 2 additions & 0 deletions examples/resources/radarr_movie/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_movie.example 10
8 changes: 8 additions & 0 deletions examples/resources/radarr_movie/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "radarr_movie" "example" {
monitored = false
title = "The Matrix"
path = "/movies/The_Matrix_1999"
quality_profile_id = 1
tmdb_id = 603
minimum_availability = "inCinemas"
}
Loading

0 comments on commit 04b1f95

Please sign in to comment.