{"id":15757965,"url":"https://github.com/ahmadnassri/terraform-module-github","last_synced_at":"2025-04-14T11:23:32.157Z","repository":{"id":188147121,"uuid":"678184576","full_name":"ahmadnassri/terraform-module-github","owner":"ahmadnassri","description":"Terraform module to manage GitHub resources","archived":false,"fork":false,"pushed_at":"2025-03-02T20:57:27.000Z","size":53,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T00:41:34.419Z","etag":null,"topics":["github","terraform"],"latest_commit_sha":null,"homepage":"","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/ahmadnassri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["ahmadnassri"]}},"created_at":"2023-08-14T00:39:20.000Z","updated_at":"2025-03-02T20:57:30.000Z","dependencies_parsed_at":"2023-08-14T02:43:06.618Z","dependency_job_id":"858246a2-80f9-4d6b-897b-bccf16c4dcd8","html_url":"https://github.com/ahmadnassri/terraform-module-github","commit_stats":null,"previous_names":["ahmadnassri/terraform-module-github"],"tags_count":14,"template":false,"template_full_name":"ahmadnassri/template-terraform-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadnassri%2Fterraform-module-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadnassri%2Fterraform-module-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadnassri%2Fterraform-module-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadnassri%2Fterraform-module-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmadnassri","download_url":"https://codeload.github.com/ahmadnassri/terraform-module-github/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248869382,"owners_count":21174861,"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":["github","terraform"],"created_at":"2024-10-04T09:41:21.617Z","updated_at":"2025-04-14T11:23:32.104Z","avatar_url":"https://github.com/ahmadnassri.png","language":"HCL","funding_links":["https://github.com/sponsors/ahmadnassri"],"categories":[],"sub_categories":[],"readme":"# GitHub Terraform Module\n\nan opinionated module for managing entire user/org github repositories\n\n[![license][license-img]][license-url]\n[![release][release-img]][release-url]\n\n## Usage\n\n``` tf\nmodule \"github\" {\n  source = \"github.com/ahmadnassri/terraform-module-github\"\n\n  owner = \"my-org\"\n\n  secret_rotation = var.ROTATION_KEY\n\n  secrets = {\n    SUPER_SECRET_KEY = var.SUPER_SECRET_KEY_VALUE\n  }\n\n  defaults = {\n    allow_auto_merge       = true\n    allow_rebase_merge     = true\n    allow_merge_commit     = false\n    delete_branch_on_merge = true\n    dismiss_stale          = true\n  }\n\n  repositories = {\n    my-repo = {\n      description = \"my repo description\"\n      topics      = [\"nodejs\", \"terraform\", \"github\"]\n      secrets     = [\"SUPER_SECRET_KEY\"]\n    }\n  }\n}\n```\n\n## Inputs\n\n| Name              | Type          | Default | Required | Description                      |\n|-------------------|---------------|---------|----------|----------------------------------|\n| `owner`           | `string`      | `-`     | ✅       | github owner                     |\n| `repositories`    | `map(object)` | `-`     | ✅       | repositories configuration       |\n| `defaults`        | `object`      | `{}`    | ❌       | default repository configuration |\n| `secrets`         | `map(any)`    | `{}`    | ❌       | secrets to manage                |\n| `secret_rotation` | `string`      | `now`   | ❌       | secret rotation key              |\n\n## `repositories`\n\nA `map` of repositories to create / manage\n\n``` tf\nrepos = {\n  \u003cname\u003e = { \u003cconfiguration\u003e },\n  \u003cname\u003e = { \u003cconfiguration\u003e },\n  ...\n}\n```\n\n###### Example\n\n``` tf\nrepos = {\n  repository_name = {\n    description = \"a unique description for this repo\"\n    topics      = [\"nodejs\", \"terraform\", \"github\"]\n  }\n}\n```\n\n### `repositories` and `defaults`\n\n| Name                     | Type           | Default   | Required | Description                                                      |\n|--------------------------|----------------|-----------|----------|------------------------------------------------------------------|\n| `allow_auto_merge`       | `bool`         | `true`    | ❌       | allow auto-merging pull requests                                 |\n| `allow_rebase_merge`     | `bool`         | `true`    | ❌       | allow rebase-merging pull requests                               |\n| `allow_merge_commit`     | `bool`         | `false`   | ❌       | allow merging pull requests with a merge commit                  |\n| `allow_squash_merge`     | `bool`         | `false`   | ❌       | allow squash-merging pull requests                               |\n| `archived`               | `bool`         | `false`   | ❌       | archive this repository?                                         |\n| `default_branch`         | `string`       | `master`  | ❌       | set the default branch for this repository.                      |\n| `delete_branch_on_merge` | `bool`         | `true`    | ❌       | automatically delete head branches when pull requests are merged |\n| `description`            | `string`       | `-`       | ❌       | a short description of the repository                            |\n| `has_issues`             | `bool`         | `false`   | ❌       | enable issues for this repository                                |\n| `has_projects`           | `bool`         | `false`   | ❌       | enable projects for this repository                              |\n| `has_wiki`               | `bool`         | `false`   | ❌       | enable the wiki for this repository                              |\n| `homepage_url`           | `string`       | `-`       | ❌       | a URL with more information about the repository                 |\n| `is_template`            | `bool`         | `false`   | ❌       | make this repository available as a template repository          |\n| `visibility`             | `string`       | `private` | ❌       | either `public` or `private`                                     |\n| `topics`                 | `list(string)` | `[]`      | ❌       | a list of topics to add to the repository                        |\n| `vulnerability_alerts`   | `bool`         | `true`    | ❌       | enable security alerts for this repository                       |\n| `enforce_admins`         | `bool`         | `false`   | ❌       | block force pushes that alter the protected branch(es)           |\n| `require_pr`             | `bool`         | `true`    | ❌       | require pull request reviews before merging                      |\n| `required_checks`        | `list(string)` | `[]`      | ❌       | require status checks to pass before merging                     |\n| `required_reviews`       | `number`       | `1`       | ❌       | require review from Code Owners before merging                   |\n| `require_linear`         | `bool`         | `true`    | ❌       | require linear history                                           |\n| `require_signature`      | `bool`         | `true`    | ❌       | require signed commits                                           |\n| `dismiss_stale`          | `bool`         | `true`    | ❌       | dismiss approving reviews when someone pushes a new commit       |\n| `last_push_approval`     | `bool`         | `false`   | ❌       | require review from Code Owners for the last push                |\n| `template_repo`          | `string`       | `-`       | ❌       | the repository to use as a template for this repository          |\n| `protected_branches`     | `list(string)` | `[]`      | ❌       | a list of branches to protect                                    |\n| `secrets`                | `list(string)` | `string`  | ❌       | a list of secrets to manage                                      |\n| `pages`                  | `object`       | `{}`      | ❌       | a map of pages configuration                                     |\n| `actions_access_level`   | `string`       | `none`    | ❌       | access level of a non-public repositories actions                |\n\n#### `pages`\n\n| Name     | Type     | Default | Required | Description                                    |\n|----------|----------|---------|----------|------------------------------------------------|\n| `path`   | `string` | `/`     | ❌       | the path to the directory containing the pages |\n| `branch` | `string` | `docs`  | ❌       | the branch to use for publishing               |\n| `cname`  | `string` | `-`     | ❌       | the custom domain to use for publishing        |\n\n----\n\u003e Author: [Ahmad Nassri](https://www.ahmadnassri.com/) \u0026bull;\n\u003e Twitter: [@AhmadNassri](https://twitter.com/AhmadNassri)\n\n[license-url]: LICENSE\n[license-img]: https://badgen.net/github/license/ahmadnassri/terraform-module-github\n\n[release-url]: https://github.com/ahmadnassri/terraform-module-github/releases\n[release-img]: https://badgen.net/github/release/ahmadnassri/terraform-module-github\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadnassri%2Fterraform-module-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmadnassri%2Fterraform-module-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadnassri%2Fterraform-module-github/lists"}