{"id":21155648,"url":"https://github.com/benoit-garcia/terraform-github-repository","last_synced_at":"2026-02-10T10:07:23.225Z","repository":{"id":86537806,"uuid":"597232798","full_name":"benoit-garcia/terraform-github-repository","owner":"benoit-garcia","description":"Terraform Module for managing Github Repositories and default settings.","archived":false,"fork":false,"pushed_at":"2025-03-04T17:07:54.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T18:22:23.865Z","etag":null,"topics":["github","terraform-module"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"akur8-oss/terraform-github-repository","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benoit-garcia.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":"2023-02-03T23:32:47.000Z","updated_at":"2025-03-04T17:07:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f4edad7-044f-41b5-85fc-63dfd95407b5","html_url":"https://github.com/benoit-garcia/terraform-github-repository","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoit-garcia%2Fterraform-github-repository","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoit-garcia%2Fterraform-github-repository/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoit-garcia%2Fterraform-github-repository/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoit-garcia%2Fterraform-github-repository/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benoit-garcia","download_url":"https://codeload.github.com/benoit-garcia/terraform-github-repository/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243597837,"owners_count":20316844,"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-module"],"created_at":"2024-11-20T11:25:28.980Z","updated_at":"2026-02-10T10:07:23.219Z","avatar_url":"https://github.com/benoit-garcia.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-github-repository\n\nThis module is used to create Github repositories with default settings.\n\n## Usage\n\n### Use the module\n\n```hcl\nmodule \"repo\" {\n  source = \"./\"\n\n  name = \"my-repo\"\n}\n```\n\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement_terraform) | ~\u003e 1 |\n| \u003ca name=\"requirement_github\"\u003e\u003c/a\u003e [github](#requirement_github) | ~\u003e 6, \u003e= 6.2.1 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_github\"\u003e\u003c/a\u003e [github](#provider_github) | ~\u003e 6, \u003e= 6.2.1 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [github_branch.default](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch) | resource |\n| [github_branch_default.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_default) | resource |\n| [github_branch_protection.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection) | resource |\n| [github_issue_label.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/issue_label) | resource |\n| [github_repository.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository) | resource |\n| [github_repository_ruleset.tag_protection](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_ruleset) | resource |\n| [github_team.maintain](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team) | resource |\n| [github_team.read](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team) | resource |\n| [github_team.write](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team) | resource |\n| [github_team_repository.maintain](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource |\n| [github_team_repository.read](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource |\n| [github_team_repository.write](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource |\n| [github_team.maintain](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/team) | data source |\n| [github_team.read](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/team) | data source |\n| [github_team.write](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/team) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input_name) | (Required) The name of the repository. | `string` | n/a | yes |\n| \u003ca name=\"input_allow_auto_merge\"\u003e\u003c/a\u003e [allow_auto_merge](#input_allow_auto_merge) | Set to `true` to allow auto-merging pull requests on the repository. | `bool` | `false` | no |\n| \u003ca name=\"input_allow_merge_commit\"\u003e\u003c/a\u003e [allow_merge_commit](#input_allow_merge_commit) | Set to `true` to enable merge commits on the repository. | `bool` | `false` | no |\n| \u003ca name=\"input_allow_rebase_merge\"\u003e\u003c/a\u003e [allow_rebase_merge](#input_allow_rebase_merge) | Set to `true` to disable rebase merges on the repository. | `bool` | `false` | no |\n| \u003ca name=\"input_allow_squash_merge\"\u003e\u003c/a\u003e [allow_squash_merge](#input_allow_squash_merge) | Set to `false` to disable squash merges on the repository. | `bool` | `true` | no |\n| \u003ca name=\"input_allow_update_branch\"\u003e\u003c/a\u003e [allow_update_branch](#input_allow_update_branch) | Set to `true` to always suggest updating pull request branches. | `bool` | `true` | no |\n| \u003ca name=\"input_archive_on_destroy\"\u003e\u003c/a\u003e [archive_on_destroy](#input_archive_on_destroy) | Set to false to delete the repository instead of archiving on destroy. | `bool` | `true` | no |\n| \u003ca name=\"input_archived\"\u003e\u003c/a\u003e [archived](#input_archived) | Specifies if the repository should be archived. Defaults to false. NOTE Currently, the API does not support unarchiving. | `bool` | `false` | no |\n| \u003ca name=\"input_auto_init\"\u003e\u003c/a\u003e [auto_init](#input_auto_init) | Set to `false` to prevent producing an initial commit in the repository. | `bool` | `true` | no |\n| \u003ca name=\"input_branch_protections\"\u003e\u003c/a\u003e [branch_protections](#input_branch_protections) | List of branches to protect, allong with their configuration. | ```map(object({ allows_deletions = optional(bool, false), allows_force_pushes = optional(bool, false), blocks_creations = optional(bool, false), contexts = optional(list(string), []), dismiss_stale_reviews = optional(bool, true), dismissal_restrictions = optional(list(string), []), enforce_admins = optional(bool, true), force_push_bypassers = optional(list(string), []), lock_branch = optional(bool, false), push_allowances = optional(list(string), []), pull_request_bypassers = optional(list(string), []), require_code_owner_reviews = optional(bool, true), require_conversation_resolution = optional(bool, true), require_last_push_approval = optional(bool, true), require_signed_commits = optional(bool, true), required_approving_review_count = optional(number, 2), required_linear_history = optional(bool, true), restrict_dismissals = optional(bool, false), strict = optional(bool, true), }))``` | `{}` | no |\n| \u003ca name=\"input_create_default_labels\"\u003e\u003c/a\u003e [create_default_labels](#input_create_default_labels) | Create github default labels | `bool` | `true` | no |\n| \u003ca name=\"input_create_new_teams\"\u003e\u003c/a\u003e [create_new_teams](#input_create_new_teams) | Create new teams to delegate permissions on the repositor. | `bool` | `false` | no |\n| \u003ca name=\"input_default_branch\"\u003e\u003c/a\u003e [default_branch](#input_default_branch) | The name of the repository branch. | `string` | `\"main\"` | no |\n| \u003ca name=\"input_delete_branch_on_merge\"\u003e\u003c/a\u003e [delete_branch_on_merge](#input_delete_branch_on_merge) | Automatically delete head branch after a pull request is merged. Defaults to true. | `bool` | `true` | no |\n| \u003ca name=\"input_description\"\u003e\u003c/a\u003e [description](#input_description) | A description of the repository. | `string` | `null` | no |\n| \u003ca name=\"input_gitignore_template\"\u003e\u003c/a\u003e [gitignore_template](#input_gitignore_template) | Use the name of the template without the extension. For example, `Haskell`. | `string` | `null` | no |\n| \u003ca name=\"input_has_discussions\"\u003e\u003c/a\u003e [has_discussions](#input_has_discussions) | Set to `true` to enable GitHub Discussions on the repository. Defaults to `false`. | `bool` | `false` | no |\n| \u003ca name=\"input_has_issues\"\u003e\u003c/a\u003e [has_issues](#input_has_issues) | Set to `true` to enable the GitHub Issues features on the repository. | `bool` | `false` | no |\n| \u003ca name=\"input_has_projects\"\u003e\u003c/a\u003e [has_projects](#input_has_projects) | Set to `true` to enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default to false and will otherwise default to true. If you specify true when it has been disabled it will return an error. | `bool` | `false` | no |\n| \u003ca name=\"input_has_wiki\"\u003e\u003c/a\u003e [has_wiki](#input_has_wiki) | Set to `true` to enable the GitHub Wiki features on the repository. | `bool` | `false` | no |\n| \u003ca name=\"input_homepage_url\"\u003e\u003c/a\u003e [homepage_url](#input_homepage_url) | URL of a page describing the project. | `string` | `null` | no |\n| \u003ca name=\"input_is_template\"\u003e\u003c/a\u003e [is_template](#input_is_template) | Set to `true` to tell GitHub that this is a template repository. | `bool` | `false` | no |\n| \u003ca name=\"input_labels\"\u003e\u003c/a\u003e [labels](#input_labels) | List of issues label | ```map(object({ color = string, description = optional(string, null), }))``` | `{}` | no |\n| \u003ca name=\"input_license_template\"\u003e\u003c/a\u003e [license_template](#input_license_template) | Use the name of the template without the extension. For example, `mit` or `mpl-2.0`. | `string` | `null` | no |\n| \u003ca name=\"input_merge_commit_message\"\u003e\u003c/a\u003e [merge_commit_message](#input_merge_commit_message) | Message of merge commit messages. Can be `PR_BODY`, `PR_TITLE`, or `BLANK` for a default merge commit message. Applicable only if `allow_merge_commit` is `true`. | `string` | `\"PR_TITLE\"` | no |\n| \u003ca name=\"input_merge_commit_title\"\u003e\u003c/a\u003e [merge_commit_title](#input_merge_commit_title) | Title of merge commit messages. Can be `PR_TITLE` or `MERGE_MESSAGE` for a default merge commit title. Applicable only if `allow_merge_commit` is `true`. | `string` | `\"MERGE_MESSAGE\"` | no |\n| \u003ca name=\"input_protect_tags\"\u003e\u003c/a\u003e [protect_tags](#input_protect_tags) | Enable rules so only Repository and Organization admins can push tags. | `bool` | `true` | no |\n| \u003ca name=\"input_squash_merge_commit_message\"\u003e\u003c/a\u003e [squash_merge_commit_message](#input_squash_merge_commit_message) | Message of squash merge commit messages.Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message. Applicable only if `allow_squash_merge` is `true`. | `string` | `\"COMMIT_MESSAGES\"` | no |\n| \u003ca name=\"input_squash_merge_commit_title\"\u003e\u003c/a\u003e [squash_merge_commit_title](#input_squash_merge_commit_title) | Title of squash merge commit messages. Can be `PR_TITLE` or `COMMIT_OR_PR_TITLE` for a default squash merge commit title. Applicable only if `allow_squash_merge` is `true`. | `string` | `\"COMMIT_OR_PR_TITLE\"` | no |\n| \u003ca name=\"input_teams_maintain\"\u003e\u003c/a\u003e [teams_maintain](#input_teams_maintain) | Slugs of the teams that will be granted the 'maintain' privilege. If null, a team will be created. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_teams_read\"\u003e\u003c/a\u003e [teams_read](#input_teams_read) | Slugs of the teams that will be granted the 'pull' privilege. If null, a team will be created. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_teams_write\"\u003e\u003c/a\u003e [teams_write](#input_teams_write) | Slugs of the teams that will be granted the 'write' privilege. If null, a team will be created. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_template\"\u003e\u003c/a\u003e [template](#input_template) | Name of the template to use to create the repository (formed as 'owner/repository'). | `string` | `null` | no |\n| \u003ca name=\"input_topics\"\u003e\u003c/a\u003e [topics](#input_topics) | The list of topics of the repository. | `list(string)` | `[]` | no |\n| \u003ca name=\"input_visibility\"\u003e\u003c/a\u003e [visibility](#input_visibility) | Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter. | `string` | `\"private\"` | no |\n| \u003ca name=\"input_vulnerability_alerts\"\u003e\u003c/a\u003e [vulnerability_alerts](#input_vulnerability_alerts) | Set to true to enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings. | `bool` | `true` | no |\n| \u003ca name=\"input_web_commit_signoff_required\"\u003e\u003c/a\u003e [web_commit_signoff_required](#input_web_commit_signoff_required) | Require contributors to sign off on web-based commits. | `bool` | `false` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_full_name\"\u003e\u003c/a\u003e [full_name](#output_full_name) | A string of the form 'orgname/reponame'. |\n| \u003ca name=\"output_git_clone_url\"\u003e\u003c/a\u003e [git_clone_url](#output_git_clone_url) | URL that can be provided to git clone to clone the repository anonymously via the git protocol. |\n| \u003ca name=\"output_html_url\"\u003e\u003c/a\u003e [html_url](#output_html_url) | URL to the repository on the web. |\n| \u003ca name=\"output_http_clone_url\"\u003e\u003c/a\u003e [http_clone_url](#output_http_clone_url) | URL that can be provided to git clone to clone the repository via HTTPS. |\n| \u003ca name=\"output_ssh_clone_url\"\u003e\u003c/a\u003e [ssh_clone_url](#output_ssh_clone_url) | URL that can be provided to git clone to clone the repository via SSH. |\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoit-garcia%2Fterraform-github-repository","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenoit-garcia%2Fterraform-github-repository","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoit-garcia%2Fterraform-github-repository/lists"}