Skip to content

Latest commit

 

History

History
72 lines (55 loc) · 2.3 KB

File metadata and controls

72 lines (55 loc) · 2.3 KB
page_title seerr_api_object Resource - seerr
subcategory
description Universal Seerr API object resource. This can manage any Seerr endpoint by path and method configuration.

seerr_api_object (Resource)

Universal Seerr API object resource. This can manage any Seerr endpoint by path and method configuration.

Example Usage

resource "seerr_api_object" "main_settings" {
  path               = "/api/v1/settings/main"
  read_method        = "GET"
  create_method      = "POST"
  update_method      = "POST"
  delete_method      = "POST"
  suppress_not_found = false

  request_body_json = jsonencode({
    applicationTitle = "Seerr"
    locale           = "en"
  })
}

Schema

Required

  • path (String) Endpoint path or same-origin absolute URL, for example /api/v1/settings/main.

Optional

  • create_method (String) HTTP method used for create operations.
  • delete_body_json (String) Optional request body JSON for delete operations.
  • delete_method (String) HTTP method used for delete operations.
  • headers (Map of String) Extra request headers.
  • read_method (String) HTTP method used for read operations.
  • request_body_json (String) Optional request body JSON for create/update operations.
  • skip_delete (Boolean) If true, no HTTP call is made during delete. Useful for settings endpoints with no delete route.
  • suppress_not_found (Boolean) If true, a 404 during read removes the resource from state.
  • update_method (String) HTTP method used for update operations.

Read-Only

  • id (String) Terraform resource identifier.
  • response_body_json (String) Raw JSON response body from the latest operation.
  • status_code (Number) HTTP status code from the latest operation.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# In Terraform 1.5.0 and later, use an import block to import seerr_api_object. For example:
#
# import {
#   to = seerr_api_object.example
#   id = "GET:/api/v1/status"
# }

# Otherwise, use the terraform import command:
terraform import seerr_api_object.example GET:/api/v1/status