|
| 1 | +--- |
| 2 | +page_title: "restapi_object Resource - terraform-provider-restapi" |
| 3 | +subcategory: "" |
| 4 | +description: |- |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +# Resource `restapi_object` |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +## Schema |
| 15 | + |
| 16 | +### Required |
| 17 | + |
| 18 | +- **data** (String, Required) Valid JSON data that this provider will manage with the API server. |
| 19 | +- **path** (String, Required) The API path on top of the base URL set in the provider that represents objects of this type on the API server. |
| 20 | + |
| 21 | +### Optional |
| 22 | + |
| 23 | +- **create_method** (String, Optional) Defaults to `create_method` set on the provider. Allows per-resource override of `create_method` (see `create_method` provider config documentation) |
| 24 | +- **create_path** (String, Optional) Defaults to `path`. The API path that represents where to CREATE (POST) objects of this type on the API server. The string `{id}` will be replaced with the terraform ID of the object if the data contains the `id_attribute`. |
| 25 | +- **debug** (Boolean, Optional) Whether to emit verbose debug output while working with the API object on the server. |
| 26 | +- **destroy_method** (String, Optional) Defaults to `destroy_method` set on the provider. Allows per-resource override of `destroy_method` (see `destroy_method` provider config documentation) |
| 27 | +- **destroy_path** (String, Optional) Defaults to `path/{id}`. The API path that represents where to DESTROY (DELETE) objects of this type on the API server. The string `{id}` will be replaced with the terraform ID of the object. |
| 28 | +- **force_new** (List of String, Optional) Any changes to these values will result in recreating the resource instead of updating. |
| 29 | +- **id** (String, Optional) The ID of this resource. |
| 30 | +- **id_attribute** (String, Optional) Defaults to `id_attribute` set on the provider. Allows per-resource override of `id_attribute` (see `id_attribute` provider config documentation) |
| 31 | +- **object_id** (String, Optional) Defaults to the id learned by the provider during normal operations and `id_attribute`. Allows you to set the id manually. This is used in conjunction with the `*_path` attributes. |
| 32 | +- **read_method** (String, Optional) Defaults to `read_method` set on the provider. Allows per-resource override of `read_method` (see `read_method` provider config documentation) |
| 33 | +- **read_path** (String, Optional) Defaults to `path/{id}`. The API path that represents where to READ (GET) objects of this type on the API server. The string `{id}` will be replaced with the terraform ID of the object. |
| 34 | +- **read_search** (Map of String, Optional) Custom search for `read_path`. This map will take `search_key`, `search_value`, `results_key` and `query_string` (see datasource config documentation) |
| 35 | +- **update_method** (String, Optional) Defaults to `update_method` set on the provider. Allows per-resource override of `update_method` (see `update_method` provider config documentation) |
| 36 | +- **update_path** (String, Optional) Defaults to `path/{id}`. The API path that represents where to UPDATE (PUT) objects of this type on the API server. The string `{id}` will be replaced with the terraform ID of the object. |
| 37 | + |
| 38 | +### Read-only |
| 39 | + |
| 40 | +- **api_data** (Map of String, Read-only) After data from the API server is read, this map will include k/v pairs usable in other terraform resources as readable objects. Currently the value is the golang fmt package's representation of the value (simple primitives are set as expected, but complex types like arrays and maps contain golang formatting). |
| 41 | +- **api_response** (String, Read-only) The raw body of the HTTP response from the last read of the object. |
| 42 | +- **create_response** (String, Read-only) The raw body of the HTTP response returned when creating the object. |
| 43 | + |
| 44 | + |
0 commit comments