https://github.com/akur8-oss/terraform-github-repository
Terraform Module for managing Github Repositories and default settings.
https://github.com/akur8-oss/terraform-github-repository
terraform-modules
Last synced: 5 months ago
JSON representation
Terraform Module for managing Github Repositories and default settings.
- Host: GitHub
- URL: https://github.com/akur8-oss/terraform-github-repository
- Owner: akur8-oss
- License: mit
- Created: 2022-01-27T07:34:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-10T17:25:59.000Z (about 1 year ago)
- Last Synced: 2024-08-03T22:19:30.101Z (8 months ago)
- Topics: terraform-modules
- Language: HCL
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- jimsghstars - akur8-oss/terraform-github-repository - Terraform Module for managing Github Repositories and default settings. (HCL)
README
# terraform-github-repository
This module is used to create Github repositories with default settings.
## Usage
### Use the module
```hcl
module "repo" {
source = "./"name = "my-repo"
}
```## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement_terraform) | ~> 1.0 |
| [github](#requirement_github) | ~> 4.0 |## Providers
| Name | Version |
|------|---------|
| [github](#provider_github) | ~> 4.0 |## Resources
| Name | Type |
|------|------|
| [github_branch.default](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch) | resource |
| [github_branch_default.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_default) | resource |
| [github_repository.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository) | resource |
| [github_team.maintain](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team) | resource |
| [github_team.read](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team) | resource |
| [github_team.write](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team) | resource |
| [github_team_repository.maintain](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource |
| [github_team_repository.read](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource |
| [github_team_repository.write](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource |
| [github_team.maintain](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/team) | data source |
| [github_team.read](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/team) | data source |
| [github_team.write](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/team) | data source |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [name](#input_name) | (Required) The name of the repository. | `string` | n/a | yes |
| [allow_auto_merge](#input_allow_auto_merge) | Set to `true` to allow auto-merging pull requests on the repository. | `bool` | `false` | no |
| [allow_merge_commit](#input_allow_merge_commit) | Set to `true` to enable merge commits on the repository. | `bool` | `false` | no |
| [allow_rebase_merge](#input_allow_rebase_merge) | Set to `true` to disable rebase merges on the repository. | `bool` | `false` | no |
| [allow_squash_merge](#input_allow_squash_merge) | Set to `false` to disable squash merges on the repository. | `bool` | `true` | no |
| [archive_on_destroy](#input_archive_on_destroy) | Set to false to delete the repository instead of archiving on destroy. | `bool` | `true` | no |
| [archived](#input_archived) | Specifies if the repository should be archived. Defaults to false. NOTE Currently, the API does not support unarchiving. | `bool` | `false` | no |
| [auto_init](#input_auto_init) | Set to `false` to prevent producing an initial commit in the repository. | `bool` | `true` | no |
| [default_branch](#input_default_branch) | The name of the repository branch. | `string` | `"main"` | no |
| [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 |
| [description](#input_description) | A description of the repository. | `string` | `null` | no |
| [gitignore_template](#input_gitignore_template) | Use the name of the template without the extension. For example, `Haskell`. | `string` | `null` | no |
| [has_downloads](#input_has_downloads) | Set to `true` to enable the (deprecated) downloads features on the repository. | `bool` | `false` | no |
| [has_issues](#input_has_issues) | Set to `true` to enable the GitHub Issues features on the repository. | `bool` | `false` | no |
| [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 |
| [has_wiki](#input_has_wiki) | Set to `true` to enable the GitHub Wiki features on the repository. | `bool` | `false` | no |
| [homepage_url](#input_homepage_url) | URL of a page describing the project. | `string` | `null` | no |
| [is_template](#input_is_template) | Set to `true` to tell GitHub that this is a template repository. | `bool` | `false` | no |
| [license_template](#input_license_template) | Use the name of the template without the extension. For example, `mit` or `mpl-2.0`. | `string` | `null` | no |
| [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 |
| [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 |
| [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 |
| [template](#input_template) | Name of the template to use to create the repository (formed as 'owner/repository'). | `string` | `null` | no |
| [topics](#input_topics) | The list of topics of the repository. | `list(string)` | `[]` | no |
| [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 |
| [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 |## Outputs
| Name | Description |
|------|-------------|
| [full_name](#output_full_name) | A string of the form 'orgname/reponame'. |
| [git_clone_url](#output_git_clone_url) | URL that can be provided to git clone to clone the repository anonymously via the git protocol. |
| [html_url](#output_html_url) | URL to the repository on the web. |
| [http_clone_url](#output_http_clone_url) | URL that can be provided to git clone to clone the repository via HTTPS. |
| [ssh_clone_url](#output_ssh_clone_url) | URL that can be provided to git clone to clone the repository via SSH. |