An open API service indexing awesome lists of open source software.

https://github.com/antmelekhin/terraform-github-repository

A Terraform module to manage GitHub Repositories.
https://github.com/antmelekhin/terraform-github-repository

github github-repository iac terraform terraform-module

Last synced: 28 days ago
JSON representation

A Terraform module to manage GitHub Repositories.

Awesome Lists containing this project

README

          

# GitHub Module

This module manages GitHub repositories.

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.13 |
| [github](#requirement\_github) | >= 6.0 |

## Providers

| Name | Version |
|------|---------|
| [github](#provider\_github) | >= 6.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [github_actions_secret.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_secret) | resource |
| [github_actions_variable.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_variable) | resource |
| [github_branch.additional](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch) | resource |
| [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 |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [name](#input\_name) | The name of the repository. | `string` | n/a | yes |
| [actions\_encrypted\_secrets](#input\_actions\_encrypted\_secrets) | Configuring encrypted actions secrets. | `map(string)` | `{}` | no |
| [actions\_plaintext\_secrets](#input\_actions\_plaintext\_secrets) | Configuring plaintext actions secrets. | `map(string)` | `{}` | no |
| [actions\_variables](#input\_actions\_variables) | Configuring actions variables. | `map(string)` | `{}` | no |
| [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 `false` to disable merge commits on the repository. | `bool` | `true` | no |
| [allow\_rebase\_merge](#input\_allow\_rebase\_merge) | Set to `false` to disable rebase merges on the repository. | `bool` | `true` | no |
| [allow\_squash\_merge](#input\_allow\_squash\_merge) | Set to `false` to disable squash merges on the repository. | `bool` | `true` | no |
| [allow\_update\_branch](#input\_allow\_update\_branch) | Set to `false` to disable updating pull request branches. | `bool` | `true` | no |
| [archive\_on\_destroy](#input\_archive\_on\_destroy) | Set to `true` to archive the repository instead of deleting on destroy. | `bool` | `false` | no |
| [archived](#input\_archived) | Specifies if the repository should be archived. | `bool` | `false` | no |
| [auto\_init](#input\_auto\_init) | Set to `true` to produce an initial commit in the repository. | `bool` | `false` | no |
| [branches](#input\_branches) | The list of a branches of the repository. Branches can only be created on non-empty repositories. | `list(map(string))` | `[]` | no |
| [default\_branch](#input\_default\_branch) | The name of the default branch of the repository. Default branch can only be created on non-empty repositories. | `string` | `null` | no |
| [default\_branch\_rename](#input\_default\_branch\_rename) | Indicate if it should rename the branch rather than use an existing default branch. | `bool` | `false` | no |
| [delete\_branch\_on\_merge](#input\_delete\_branch\_on\_merge) | Automatically delete head branch after a pull request is merged. | `bool` | `false` | 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\_discussions](#input\_has\_discussions) | Set to `true` to enable the GitHub Discussions features on the repository. | `bool` | `false` | no |
| [has\_issues](#input\_has\_issues) | Set to `false` to disable the GitHub Issues features on the repository. | `bool` | `true` | no |
| [has\_projects](#input\_has\_projects) | Set to `true` to enable the GitHub Projects features on the repository. | `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 |
| [ignore\_vulnerability\_alerts\_during\_read](#input\_ignore\_vulnerability\_alerts\_during\_read) | Set to `true` to not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. | `bool` | `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 |
| [merge\_commit\_message](#input\_merge\_commit\_message) | Can be `PR_BODY`, `PR_TITLE`, or `BLANK` for a default merge commit message. | `string` | `"PR_TITLE"` | no |
| [merge\_commit\_title](#input\_merge\_commit\_title) | Can be `PR_TITLE` or `MERGE_MESSAGE` for a default merge commit title. | `string` | `"MERGE_MESSAGE"` | no |
| [squash\_merge\_commit\_message](#input\_squash\_merge\_commit\_message) | Can be `PR_BODY`, `COMMIT_MESSAGES`, or `BLANK` for a default squash merge commit message. | `string` | `"COMMIT_MESSAGES"` | no |
| [squash\_merge\_commit\_title](#input\_squash\_merge\_commit\_title) | Can be `PR_TITLE` or `COMMIT_OR_PR_TITLE` for a default squash merge commit title. | `string` | `"COMMIT_OR_PR_TITLE"` | no |
| [topics](#input\_topics) | The list of topics of the repository. | `set(string)` | `[]` | no |
| [visibility](#input\_visibility) | Visibility of a project. Can be `public`, `private` or `internal` (GHE only). | `string` | `"public"` | no |
| [vulnerability\_alerts](#input\_vulnerability\_alerts) | Set to `false` to disable security alerts for vulnerable dependencies. | `bool` | `true` | no |
| [web\_commit\_signoff\_required](#input\_web\_commit\_signoff\_required) | Require contributors to sign off on web-based commits. | `bool` | `false` | no |

## Outputs

| Name | Description |
|------|-------------|
| [default\_branch](#output\_default\_branch) | The name of the default branch of the repository. |
| [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. |
| [name](#output\_name) | The name of the repository. |
| [repo\_id](#output\_repo\_id) | GitHub ID for the repository. |
| [ssh\_clone\_url](#output\_ssh\_clone\_url) | URL that can be provided to `git clone` to clone the repository via SSH. |