Skip to content

Commit

Permalink
show examples in documentation (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosdiez authored Oct 16, 2023
1 parent aa2d108 commit f149590
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 15 deletions.
24 changes: 18 additions & 6 deletions docs/data-sources/table_row.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,21 @@ description: |-

A row in a SN table


## Example Usage

```terraform
data "servicenow-data_table_row" "example-with-sys_id" {
table_id = "sys_user"
sys_id = "7a9dde3e6fa4310005a9fbf7eb3ee495"
}
data "servicenow-data_table_row" "example-with-email-query" {
table_id = "sys_user"
row_data = {
"email" : "[email protected]"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -22,19 +36,17 @@ A row in a SN table
### Optional

- `row_data` (Map of String) Columns
- `sys_id` (String)

### Read-Only

- `id` (String) The ID of this resource.
- `sys_class_name` (String)
- `sys_created_by` (String)
- `sys_created_on` (String)
- `sys_domain` (String)
- `sys_domain_path` (String)
- `sys_id` (String)
- `sys_mod_count` (String)
- `sys_tags` (String)
- `sys_updated_by` (String)
- `sys_updated_on` (String)

### Read-Only

- `id` (String) The ID of this resource.
39 changes: 30 additions & 9 deletions docs/resources/table_row.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,30 @@ description: |-

A row in a SN table


## Example Usage

```terraform
data "servicenow-data_table_row" "example-with-sys_id" {
table_id = "sys_user"
sys_id = "7a9dde3e6fa4310005a9fbf7eb3ee495"
}
data "servicenow-data_table_row" "example-with-email-query" {
table_id = "sys_user"
row_data = {
"email" : "[email protected]"
}
}
resource "servicenow-data_table_row" "example-row" {
table_id = "x_example_table"
row_data = {
"field1" : "value1",
"field2" : "value2"
"approvers" : "${data.servicenow-data_table_row.example-with-email-query.sys_id},${data.servicenow-data_table_row.example-with-sys_id.sys_id}"
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -22,21 +45,21 @@ A row in a SN table
### Optional

- `row_data` (Map of String) Columns
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `id` (String) The ID of this resource.
- `sys_class_name` (String)
- `sys_created_by` (String)
- `sys_created_on` (String)
- `sys_domain` (String)
- `sys_domain_path` (String)
- `sys_id` (String)
- `sys_mod_count` (String)
- `sys_tags` (String)
- `sys_updated_by` (String)
- `sys_updated_on` (String)
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `id` (String) The ID of this resource.
- `sys_id` (String)

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`
Expand All @@ -48,5 +71,3 @@ Optional:
- `delete` (String)
- `read` (String)
- `update` (String)


File renamed without changes.

0 comments on commit f149590

Please sign in to comment.