{"id":17180796,"url":"https://github.com/jsok/hiera-consul","last_synced_at":"2025-08-01T23:40:46.522Z","repository":{"id":56876367,"uuid":"37709294","full_name":"jsok/hiera-consul","owner":"jsok","description":"A Hiera backend to retrieve configuration from Hashicorp's Consul KV store","archived":false,"fork":false,"pushed_at":"2015-06-22T01:48:38.000Z","size":128,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T21:42:13.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/jsok.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":"2015-06-19T07:54:32.000Z","updated_at":"2018-08-09T09:15:07.000Z","dependencies_parsed_at":"2022-08-20T23:10:21.631Z","dependency_job_id":null,"html_url":"https://github.com/jsok/hiera-consul","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jsok/hiera-consul","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Fhiera-consul","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Fhiera-consul/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Fhiera-consul/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Fhiera-consul/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsok","download_url":"https://codeload.github.com/jsok/hiera-consul/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsok%2Fhiera-consul/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268314348,"owners_count":24230976,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-15T00:31:47.081Z","updated_at":"2025-08-01T23:40:46.465Z","avatar_url":"https://github.com/jsok.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version Badge](https://img.shields.io/gem/v/hiera-consul.svg)](https://rubygems.org/gems/hiera-consul)\n\n# hiera-consul\nA Hiera backend to retrieve configuration from Hashicorp's Consul KV store\n\n## Configuration\n\nYou should modify `hiera.yaml` as follows:\n\n    :backends:\n        - consul\n\n    :consul:\n        :addr: # parsed from CONSUL_HTTP_ADDR if not specified\n        :port: # parsed from CONSUL_HTTP_ADDR if not specified\n        :paths:\n            - /v1/kv/hiera\n            - /v1/kv/%{environment}\n\n## Lookups\n\nOnly string and hash lookups are support, i.e. `hiera()` and `hiera_hash()`.\n\nA string lookup will return the contents of the value at the specified key.\n\n### Hash lookups\n\nA hash lookup will use the `recurse` parameter of the\n[KV HTTP API](https://www.consul.io/docs/agent/http/kv.html) and performs a\ndeep merge to produce an answer.\n\nExample (values have been base64 decoded for clarity):\n\n    \u003e curl http://127.0.0.1:8500/v1/kv/hiera/foo?recurse\n    [\n        {\n            \"CreateIndex\": 1,\n            \"Flags\": 0,\n            \"Key\": \"foo/\",\n            \"LockIndex\": 0,\n            \"ModifyIndex\": 305244,\n            \"Value\": null\n        },\n        {\n            \"CreateIndex\": 2,\n            \"Flags\": 0,\n            \"Key\": \"foo/bar\",\n            \"LockIndex\": 0,\n            \"ModifyIndex\": 305244,\n            \"Value\": \"42\"\n        },\n        {\n            \"CreateIndex\": 3,\n            \"Flags\": 0,\n            \"Key\": \"foo/baz\",\n            \"LockIndex\": 0,\n            \"ModifyIndex\": 305244,\n            \"Value\": null\n        },\n        {\n            \"CreateIndex\": 4,\n            \"Flags\": 0,\n            \"Key\": \"foo/baz/qux\",\n            \"LockIndex\": 0,\n            \"ModifyIndex\": 305244,\n            \"Value\": \"hello\"\n        }\n    ]\n\nWill return an answer:\n\n    \u003e hiera -h foo\n    {\n        \"foo\" =\u003e {\n            \"bar\" =\u003e \"42\",\n            \"baz\" =\u003e {\n                \"qux\" =\u003e \"hello\"\n            }\n        }\n    }\n\n## TODO\n\nThis is very much alpha, some improvements:\n\n - [ ] Add configuration options for SSL/TLS\n - [ ] Setup CI\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsok%2Fhiera-consul","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsok%2Fhiera-consul","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsok%2Fhiera-consul/lists"}