{"id":21897449,"url":"https://github.com/form3tech-oss/terraform-provider-codeowners","last_synced_at":"2025-10-29T15:32:05.937Z","repository":{"id":34269607,"uuid":"169757258","full_name":"form3tech-oss/terraform-provider-codeowners","owner":"form3tech-oss","description":"A terraform provider for your GitHub CODEOWNERS files","archived":false,"fork":false,"pushed_at":"2024-03-05T09:28:41.000Z","size":12471,"stargazers_count":25,"open_issues_count":7,"forks_count":8,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-12T07:03:37.092Z","etag":null,"topics":["codeowners","terraform-provider"],"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/form3tech-oss.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-08T15:38:59.000Z","updated_at":"2024-02-20T03:33:58.000Z","dependencies_parsed_at":"2023-12-06T12:40:55.386Z","dependency_job_id":"b52cdbfa-5d7c-4c40-86dd-a306d1a92160","html_url":"https://github.com/form3tech-oss/terraform-provider-codeowners","commit_stats":{"total_commits":59,"total_committers":15,"mean_commits":3.933333333333333,"dds":0.6949152542372881,"last_synced_commit":"81d2f9709a2671160adcfa273bbea6361525c586"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/form3tech-oss%2Fterraform-provider-codeowners","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/form3tech-oss%2Fterraform-provider-codeowners/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/form3tech-oss%2Fterraform-provider-codeowners/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/form3tech-oss%2Fterraform-provider-codeowners/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/form3tech-oss","download_url":"https://codeload.github.com/form3tech-oss/terraform-provider-codeowners/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249125961,"owners_count":21216705,"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":["codeowners","terraform-provider"],"created_at":"2024-11-28T14:17:19.016Z","updated_at":"2025-10-29T15:32:05.855Z","avatar_url":"https://github.com/form3tech-oss.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CODEOWNERS Terraform Provider\n\n[![Build status](https://github.com/form3tech-oss/terraform-provider-codeowners/actions/workflows/ci.yaml/badge.svg)](https://github.com/form3tech-oss/terraform-provider-codeowners/actions)\n\nTerraform Provider for GitHub [CODEOWNERS](https://help.github.com/articles/about-code-owners/) files.\n\n## Summary\n\nDo you use terraform to manage your GitHub organisation? Are you frustrated that you can't manage your code review approvers using the same method? Well, now you can!\n\n## Installation\n\nDownload the relevant binary from [releases](https://github.com/form3tech-oss/terraform-provider-codeowners/releases) and copy it to `$HOME/.terraform.d/plugins/`.\n\n## Configuration\n\nThe following provider block variables are available for configuration:\n\n- `commit_message_prefix` - An optional prefix to be added to all commits generated as a result of manipulating the `CODEOWNERS` file.\n- `github_token` GitHub auth token - see below section. (read from env var `$GITHUB_TOKEN`)\n- `username` Username to use in commits (read from env var `$GITHUB_USERNAME`)\n- `email` Email to use in commits - this must match the email in your GPG key if you are signing commits (read from env var `$GITHUB_EMAIL`)\n- `gpg_secret_key` The private GPG key to use to sign commits (optional) (read from env var `$GPG_SECRET_KEY`)\n- `gpg_passphrase` The passphrase associated with the aforementioned GPG key (optional) (read from env var `$GPG_PASSPHRASE`)\n\n### Authentication\n\nThere are two methods for authenticating with this provider.\n\nYou can specify your github token in the `provider` block, as below:\n\n```hcl\nprovider \"codeowners\" {\n    github_token = \"...\"\n}\n```\n\nAlternatively, you can use the following environment variable:\n\n```bash\nexport GITHUB_TOKEN=\"...\"\n```\n\nProvider block variables will override environment variables, where provided.\n\nYour token must have the full `repo` permission block set.\n\n## Resources\n\n### `codeowners_file`\n\n```hcl\nresource \"codeowners_file\" \"my-codeowners-file\" {\n  # for repo github.com/my-org/my-repo\n  repository_name  = \"my-repo\"\n  repository_owner = \"my-org\"\n  branch           = \"master\" # this is where changes will be committed - you can omit this to use the default repo branch (recommended)\n  rules = [\n    {\n      pattern = \"*\"\n      usernames = [ \"expert\" ]\n    },\n    {\n      pattern = \"*.java\"\n      usernames = [ \"java-expert\", \"my-org/experts\" ]\n    }\n  ]\n}\n```\n\nThe above would result in the following content being committed to `.github/CODEOWNERS` on `master` of the `github.com/my-org/my-repo` repository:\n\n```\n# automatically generated by terraform - please do not edit here\n* @expert \n*.java @java-expert @my-org/experts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fform3tech-oss%2Fterraform-provider-codeowners","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fform3tech-oss%2Fterraform-provider-codeowners","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fform3tech-oss%2Fterraform-provider-codeowners/lists"}