Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
Signed-off-by: Xabier Larrakoetxea <[email protected]>
  • Loading branch information
slok committed Aug 6, 2022
1 parent 00c24e6 commit 3f65c0d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions docs/data-sources/jq.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Executes a JQ query providing the result.
```terraform
# In this example, we are filtering a very simple string and storing it in a terraform output as HCL data.
data "dataprocessor_jq" "test" {
input_data = <<EOT
input_data = <<EOT
{"timestamp": 1234567890,"report": "Age Report","results": [{ "name": "John", "age": 43, "city": "TownA" },{ "name": "Joe", "age": 10, "city": "TownB" }]}
EOT
query = "[.results[] | {name, age}]"
query = "[.results[] | {name, age}]"
}
output "results" {
value = jsonencode(dataprocessor_jq.test.result)
output "test" {
value = jsondecode(data.dataprocessor_jq.test.result)
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ data "dataprocessor_jq" "test" {
query = "[.results[] | {name, age}]"
}
output "test_jq" {
test = jsonencode(dataprocessor_jq.test.result)
output "test" {
value = jsondecode(data.dataprocessor_jq.test.result)
}
```

Expand Down
8 changes: 4 additions & 4 deletions examples/data-sources/dataprocessor_jq/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# In this example, we are filtering a very simple string and storing it in a terraform output as HCL data.
data "dataprocessor_jq" "test" {
input_data = <<EOT
input_data = <<EOT
{"timestamp": 1234567890,"report": "Age Report","results": [{ "name": "John", "age": 43, "city": "TownA" },{ "name": "Joe", "age": 10, "city": "TownB" }]}
EOT

query = "[.results[] | {name, age}]"
query = "[.results[] | {name, age}]"
}

output "results" {
value = jsonencode(dataprocessor_jq.test.result)
output "test" {
value = jsondecode(data.dataprocessor_jq.test.result)
}
4 changes: 2 additions & 2 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ data "dataprocessor_jq" "test" {
query = "[.results[] | {name, age}]"
}

output "test_jq" {
test = jsonencode(dataprocessor_jq.test.result)
output "test" {
value = jsondecode(data.dataprocessor_jq.test.result)
}

0 comments on commit 3f65c0d

Please sign in to comment.