{"id":21401127,"url":"https://github.com/massdriver-cloud/terraform-provider-jq","last_synced_at":"2025-07-13T21:31:34.126Z","repository":{"id":65527288,"uuid":"463964188","full_name":"massdriver-cloud/terraform-provider-jq","owner":"massdriver-cloud","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-17T04:44:08.000Z","size":55,"stargazers_count":10,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2023-03-04T01:08:43.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/massdriver-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-26T20:54:26.000Z","updated_at":"2023-02-15T05:07:29.000Z","dependencies_parsed_at":"2023-01-27T10:25:12.994Z","dependency_job_id":null,"html_url":"https://github.com/massdriver-cloud/terraform-provider-jq","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Fterraform-provider-jq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Fterraform-provider-jq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Fterraform-provider-jq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/massdriver-cloud%2Fterraform-provider-jq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/massdriver-cloud","download_url":"https://codeload.github.com/massdriver-cloud/terraform-provider-jq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225919195,"owners_count":17545200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T15:26:13.295Z","updated_at":"2024-11-22T15:26:13.838Z","avatar_url":"https://github.com/massdriver-cloud.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Provider for jq\n\nThis plugin brings the power of [jq](https://stedolan.github.io/jq/) to Terraform, allowing you to parse and extract complex data from JSON or even HCL objects.\n\n## Usage\n\nNo initialiation is required, you can begin using the provider immediately.\n\n```hcl\ndata \"jq_query\" \"example\" {\n    data = \"{\\\"a\\\": \\\"b\\\"}\"\n    query = \".a\"\n}\n\noutput \"example\" {\n    value = data.jq_query.example.result\n}\n```\n\nThis will output:\n```\nOutputs:\n\nexample = \"\\\"b\\\"\"\n```\n\n### HCL Compatibility\n\nThe jq operates on json formatted strings. Fortunately, terraform provides the `jsonencode()` and `jsondecode()` functions for easily converting back and forth between HCL and json strings.\n\nThe above example in pure HCL:\n\n```hcl\ndata \"jq_query\" \"example\" {\n    data = jsonencode({a = \"b\"})\n    query = \".a\"\n}\n\noutput \"example\" {\n    value = jsondecode(data.jq_query.example.result)\n}\n```\n\nThis will output:\n```\nOutputs:\n\nexample = \"b\"\n```\n\n### Multiple Results\n\nSome jq queries will produce multiple elements. In this case, the result will have multiple lines, with each line containing an element as a JSON encoded string. Keep in mind this means that the result **cannot** be converted to HCL with `jsondecode()` as the string itself is not valid JSON.\n\n```hcl\ndata \"jq_query\" \"example\" {\n    data = jsonencode([{id:1},{id:2},{id:3}])\n    query = \".[] | .id\"\n}\n\noutput \"example\" {\n    value = data.jq_query.example.result\n}\n```\n\nThis will output:\n```sh\nOutputs:\n\nexample = \u003c\u003cEOT\n1\n2\n3\nEOT\n```\n\nBe sure to write your queries so they return a single element if you wish to convert them back to HCL with `jsondecode()`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmassdriver-cloud%2Fterraform-provider-jq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmassdriver-cloud%2Fterraform-provider-jq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmassdriver-cloud%2Fterraform-provider-jq/lists"}