{"id":21816821,"url":"https://github.com/ellerbrock/terraform-consul-backend","last_synced_at":"2026-05-09T15:39:41.412Z","repository":{"id":71785700,"uuid":"117320751","full_name":"ellerbrock/terraform-consul-backend","owner":"ellerbrock","description":":jack_o_lantern: consul as backend for terraform with docker","archived":false,"fork":false,"pushed_at":"2018-01-13T06:39:46.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T06:41:18.603Z","etag":null,"topics":["consul","consul-server","docker","docker-compose","terraform","terraform-backend"],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ellerbrock.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-13T06:39:13.000Z","updated_at":"2022-02-02T18:59:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"6485b3ec-cd09-4693-ac18-4281bbb004f7","html_url":"https://github.com/ellerbrock/terraform-consul-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellerbrock%2Fterraform-consul-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellerbrock%2Fterraform-consul-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellerbrock%2Fterraform-consul-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ellerbrock%2Fterraform-consul-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ellerbrock","download_url":"https://codeload.github.com/ellerbrock/terraform-consul-backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776353,"owners_count":20508507,"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":["consul","consul-server","docker","docker-compose","terraform","terraform-backend"],"created_at":"2024-11-27T15:37:03.784Z","updated_at":"2026-05-09T15:39:36.389Z","avatar_url":"https://github.com/ellerbrock.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"![alibaba cloud](https://github.frapsoft.com/top/open-source-v1.png)\n\n# Terraform Consul Backend Docker\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg)](https://github.com/ellerbrock/open-source-badges/) [![Gitter Chat](https://badges.gitter.im/frapsoft/frapsoft.svg)](https://gitter.im/frapsoft/frapsoft/) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php)\n\n## Configuration\n\nQuick and dirty Setup to use [Consul](https://www.consul.io/) as [Backend](https://www.terraform.io/docs/backends/types/consul.html) for [Terraform](https://www.terraform.io/).  \nI currently need a quick solution for Alibaba Cloud to store my state.  \nThis is just a first test without SSL or any deep dive in security or stability.  \nBut it works and from there we can take it futher next time ...\n\n\nRun with `docker-compose up` and you can see the WebGUI on \u003chttp://localhost:8500\u003e.\n\n### `docker-compose.yml`\n\n```\nversion: '3'\n\nservices:\n  consul:\n    image: consul:latest\n    container_name: consul\n    volumes:\n      - consul-data:/consul/data\n    environment:\n      - CONSUL_HTTP_TOKEN=\"supersecure\"\n    ports:\n      - 8300:8300/tcp\n      - 8301:8301/tcp\n      - 8301:8301/udp\n      - 8302:8302/tcp\n      - 8302:8302/udp\n      - 8400:8400/tcp\n      - 8500:8500/tcp\n      - 8600:8600/tcp\n      - 8600:8600/udp\n    networks:\n      - devops\n\nnetworks:\n  devops:\n    driver: bridge\n\nvolumes:\n  consul-data:\n```\n\n### `main.tf`\n\n```\nterraform {\n  required_version = \"\u003e= 0.11.2\"\n\n  backend \"consul\" {\n    address         = \"localhost:8500\"\n    path            = \"tf/state\"\n    access_token    = \"supersecure\"\n    lock            = true\n  }\n}\n```\n\n### What's next\n\n- secure transfere via ssl certificates\n- further look how to use vault to store secrets\n- cluster setup\n\n## Contact\n\n[![Github](https://github.frapsoft.com/social/github.png)](https://github.com/ellerbrock/)[![Docker](https://github.frapsoft.com/social/docker.png)](https://hub.docker.com/u/ellerbrock/)[![npm](https://github.frapsoft.com/social/npm.png)](https://www.npmjs.com/~ellerbrock)[![Twitter](https://github.frapsoft.com/social/twitter.png)](https://twitter.com/frapsoft/)[![Facebook](https://github.frapsoft.com/social/facebook.png)](https://www.facebook.com/frapsoft/)[![Google+](https://github.frapsoft.com/social/google-plus.png)](https://plus.google.com/116540931335841862774)[![Gitter](https://github.frapsoft.com/social/gitter.png)](https://gitter.im/frapsoft/frapsoft/)\n\n## License \n\n[![MIT license](https://badges.frapsoft.com/os/mit/mit-125x28.png?v=103)](https://opensource.org/licenses/mit-license.php)\n\nThis work by \u003ca xmlns:cc=\"http://creativecommons.org/ns#\" href=\"https://github.com/ellerbrock\" property=\"cc:attributionName\" rel=\"cc:attributionURL\"\u003eMaik Ellerbrock\u003c/a\u003e is licensed under a \u003ca rel=\"license\" href=\"https://creativecommons.org/licenses/by/4.0/\"\u003eCreative Commons Attribution 4.0 International License\u003c/a\u003e and the underlying source code is licensed under the \u003ca rel=\"license\" href=\"https://opensource.org/licenses/mit-license.php\"\u003eMIT license\u003c/a\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellerbrock%2Fterraform-consul-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fellerbrock%2Fterraform-consul-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellerbrock%2Fterraform-consul-backend/lists"}