{"id":13505734,"url":"https://github.com/veepee-oss/terustry","last_synced_at":"2025-08-26T12:15:36.632Z","repository":{"id":116346951,"uuid":"424593386","full_name":"veepee-oss/terustry","owner":"veepee-oss","description":"Open Source terraform provider registry ","archived":false,"fork":false,"pushed_at":"2024-08-13T11:56:13.000Z","size":102,"stargazers_count":66,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T18:21:16.831Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/veepee-oss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2021-11-04T12:48:54.000Z","updated_at":"2025-02-16T18:19:01.000Z","dependencies_parsed_at":"2024-11-01T03:31:02.265Z","dependency_job_id":"8ede144e-53f9-44e5-93da-2065e765caef","html_url":"https://github.com/veepee-oss/terustry","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veepee-oss%2Fterustry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veepee-oss%2Fterustry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veepee-oss%2Fterustry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/veepee-oss%2Fterustry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/veepee-oss","download_url":"https://codeload.github.com/veepee-oss/terustry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253149994,"owners_count":21861806,"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-08-01T00:01:12.421Z","updated_at":"2025-05-08T21:20:29.343Z","avatar_url":"https://github.com/veepee-oss.png","language":"Rust","funding_links":[],"categories":["Rust","Tools","Self-Hosted Registries"],"sub_categories":["Registry","Miscellaneous"],"readme":"# Terustry\nSimple configurable proxy that implement [terraform provider registry protocol](https://www.terraform.io/docs/internals/provider-registry-protocol.html), to build your own terraform provider private registry.\n\n### How it works\nTerustry use a yaml file to describe how to discover versions and download urls.\n```yaml\nproviders:\n  - name: hashicorp/hashicups # namespace/name of your provider\n    protocols: [5.0]\n    version: # vcs to fetch provider versions (gitlab and github are supported)\n      type: github \n      uri: https://api.github.com/repos/hashicorp/terraform-provider-hashicups/releases # url of the release api of your vcs\n      token: \"{{terustry_github_token}}\"\n    binaries: [{os: linux, arch: arm64}]\n    signature: # information about key used to sign your provider\n      key_id: 97751AE79C450B19\n      key_armor: \"-----BEGIN PGP PUBLIC KEY BLOCK-----\"\n    artifact: # describe how to build download urls\n      filename: terraform-provider-hashicups_{{version}}_{{os}}_{{arch}}.zip\n      download_url: https://.../v{{version}}/terraform-provider-hashicups_{{version}}_{{os}}_{{arch}}.zip\n      shasums_url: https://.../v{{version}}/terraform-provider-hashicups_{{version}}_SHA256SUMS\n      shasums_signature_url: https://.../v{{version}}/terraform-provider-hashicups_{{version}}_SHA256SUMS.sig\n```\n\nTerustry will parse the result of the release api you provide (`version.uri`), assuming each release published is a provider version.\n\nThen it will use the `artifact` section to build the download urls of your provider.\n\n\n### Run\n\n#### With docker\n```bash\ndocker run -p 8080:8080 -e TERUSTRY_GITHUB_TOKEN='XXX' -v $(pwd)/terustry-sample-github.yml:/etc/terustry.yml --rm -it vptech/terustry\n```\n\n#### With docker build\n```bash\ndocker build -t terustry .\ndocker run -p 8080:8080 -e TERUSTRY_GITHUB_TOKEN='XXX' -v $(pwd)/terustry-sample-github.yml:/etc/terustry.yml --rm -it terustry\n```\n#### With cargo\n```bash\nTERUSTRY_GITHUB_TOKEN=XXXX cargo run -- --config terustry-sample-github.yml\n```\n\nIf you want to embed the configuration in docker image, juste create a `terustry.yml` file with your configuration.\n\n### Test\n#### With curl\n```bash\n$ curl http://localhost:8080/terraform/providers/v1/hashicorp/hashicups/versions\n```\n```javascript\n{\n  id: \"hashicorp/hashicups\",\n  versions: [{\n    version: \"0.3.1\",\n    protocols: [\n      \"5.0\"\n    ],\n    platforms: [{\n      os: \"freebsd\",\n      arch: \"386\"\n    }\n  ]}]\n}\n```\n#### With terraform\n```terraform\nterraform {\n  required_providers {\n    hashicups = {\n      source = \"localhost:8081/hashicorp/hashicups\"\n      version = \"0.3.1\"\n    }\n  }\n}\n\nprovider \"hashicups\" {\n  # Configuration options\n}\n```\n\n```bash\n$ terraform init\n```\n##### Local ssl\nTerraform provider registry need to have a valid SSL certificate to work.\n\nIf you want to test the all thing (`terraform init`) locally, you have to have a \"ssl proxy\".\n\nInstall [mkcert](https://github.com/FiloSottile/mkcert) and [local-ssl-proxy](https://github.com/cameronhunter/local-ssl-proxy)\n\n```bash\nmkcert install\nmkcert localhost\nlocal-ssl-proxy --source 8081 --target 8080 --key localhost-key.pem --cert localhost.pem\n```\n\n### Caching\n\nBy default, Terustry will cache responses from Github/Gitlab for 10 minutes. This\nmay result in an unwanted behaviour where a recently released version for a given\nprovider is not available.\n\nThe new version will become available once the cache is refreshed.\n\nHowever, if you need a faster refresh timing, for example in a CI/CD pipeline, you\nmay request a specific cache entry to be invalidated using the following route:\n`GET /terraform/providers/v1/{namespace}/{provider_name}/invalidate`\n\nThis should result in an empty 200 OK response.\n\nFor example:\n```bash\ncurl http://localhost:8080/terraform/providers/v1/hashicorp/hashicups/invalidate\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveepee-oss%2Fterustry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fveepee-oss%2Fterustry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fveepee-oss%2Fterustry/lists"}