diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl new file mode 100644 index 0000000..d7a42aa --- /dev/null +++ b/.terraform.lock.hcl @@ -0,0 +1,24 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/integrations/github" { + version = "6.5.0" + hashes = [ + "h1:ikIBPXI5lx7cV4aqLWYuL+LQnHmf+FybvdpcsfAqK4o=", + "zh:3088bfd30c51ebfcb7c8d829465ec7b3c19af684cf1aff1ea1111ad3c6421c11", + "zh:34f9054b0123f9fa7ab8ebc73591d2cf502f1cc75e7594bde42ce799fcac32b6", + "zh:406dc2e63d43a24ac4f1b004e5c60ada3347207ea750bbd51e6199eb7f044f9f", + "zh:43e7b6cb7e5062d9b7b7cf4d23f6ea99fb9605fb014fede62cda307051063c05", + "zh:6a0923ebcc09cb98c488c11582375d2145ba965d1e6f2f69c077be8e1224020b", + "zh:a2331f06b7ed57e83eadb784211067d675826f67cf0ed051c8ab20335d83de9a", + "zh:a3f82213c98319f20438bdb92145ce1b0407cd8b8eec9745c036db10deb3d3a2", + "zh:b4b8db8537d8e6fb3f05ed875726823e1dc6925c479db8749016e71568ebafc4", + "zh:cdcf76f6f6f5c638db540490ab35bb1aacfc27204f1197004da5e950024afc06", + "zh:de36cea60efe2b74cec958f88ec5c39d467ad9443c9c9e311424c3db229c4e78", + "zh:dfb8949edc6722da66c78a19ccb1b81ac855439a28ca3badfdac5c10bbf2190d", + "zh:e1a81734cc81f4f51dd11ca8a62b420f68e72d00835ed54f84d71bd56d19f37f", + "zh:ec0d51640c3e3cf933c73d0ed79ba8b395d1b94fed8117a6438dba872aa5561f", + "zh:ec59b7c420a2358e9750e9c6a8a5ef26ccbb8a2cae417e115e86d63520759ea5", + "zh:fbd1fee2c9df3aa19cf8851ce134dea6e45ea01cb85695c1726670c285797e25", + ] +} diff --git a/README.md b/README.md index 7248575..0769638 100644 --- a/README.md +++ b/README.md @@ -222,5 +222,112 @@ MIT License - see [LICENSE](LICENSE) for details [![Modtest Dev](https://github.com/HappyPathway/terraform-github-repo/actions/workflows/modtest-dev.yaml/badge.svg)](https://github.com/HappyPathway/terraform-github-repo/actions/workflows/modtest-dev.yaml) -{{ .Content }} +## Requirements + +No requirements. + +## Providers + +| Name | Version | +|------|---------| +| [github](#provider\_github) | 6.5.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [github_actions_environment_secret.environment_secrets](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_environment_secret) | resource | +| [github_actions_environment_variable.environment_variables](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_environment_variable) | resource | +| [github_actions_secret.secret](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_secret) | resource | +| [github_actions_variable.variable](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/actions_variable) | resource | +| [github_branch.branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch) | resource | +| [github_branch_default.default_main_branch](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_default) | resource | +| [github_branch_protection.main](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection) | resource | +| [github_repository.repo](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository) | resource | +| [github_repository_collaborator.collaborators](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_collaborator) | resource | +| [github_repository_environment.environments](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_environment) | resource | +| [github_repository_file.codeowners](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource | +| [github_repository_file.extra_files](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource | +| [github_repository_file.managed_extra_files](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_file) | resource | +| [github_team_repository.admin](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository) | resource | +| [github_actions_public_key.repo_key](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/actions_public_key) | data source | +| [github_organization_teams.root_teams](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/organization_teams) | data source | +| [github_ref.ref](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/ref) | data source | +| [github_repository.existing](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/repository) | data source | +| [github_repository.template_repo](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/repository) | data source | +| [github_team.admin_teams](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/team) | data source | +| [github_user.collaborators](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/user) | data source | +| [github_user.pull_request_bypassers](https://registry.terraform.io/providers/integrations/github/latest/docs/data-sources/user) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [additional\_codeowners](#input\_additional\_codeowners) | Additional entries for CODEOWNERS file | `list(string)` | `[]` | no | +| [admin\_teams](#input\_admin\_teams) | Teams to grant admin access | `list(string)` | `[]` | no | +| [archive\_on\_destroy](#input\_archive\_on\_destroy) | Archive repository instead of deleting on destroy | `bool` | `true` | no | +| [archived](#input\_archived) | Archive this repository | `bool` | `false` | no | +| [collaborators](#input\_collaborators) | Map of collaborators and their permission levels | `map(string)` | `{}` | no | +| [create\_codeowners](#input\_create\_codeowners) | Create CODEOWNERS file | `bool` | `true` | no | +| [create\_repo](#input\_create\_repo) | Whether to create a new repository or manage an existing one | `bool` | `true` | no | +| [enforce\_prs](#input\_enforce\_prs) | Enforce pull request reviews | `bool` | `true` | no | +| [environments](#input\_environments) | List of GitHub environments to create for the repository |
list(object({
name = string
reviewers = optional(object({
teams = optional(list(string), [])
users = optional(list(string), [])
}), {})
deployment_branch_policy = optional(object({
protected_branches = optional(bool, true)
custom_branch_policies = optional(bool, false)
}), {})
secrets = optional(list(object({
name = string
value = string
})), [])
vars = optional(list(object({
name = string
value = string
})), [])
}))
| `[]` | no | +| [extra\_files](#input\_extra\_files) | Additional files to create in the repository |
list(object({
path = string
content = string
}))
| `[]` | no | +| [force\_name](#input\_force\_name) | Keep exact repository name (no date suffix) | `bool` | `false` | no | +| [github\_allow\_auto\_merge](#input\_github\_allow\_auto\_merge) | Allow auto-merging pull requests | `bool` | `false` | no | +| [github\_allow\_merge\_commit](#input\_github\_allow\_merge\_commit) | Allow merge commits | `bool` | `false` | no | +| [github\_allow\_rebase\_merge](#input\_github\_allow\_rebase\_merge) | Allow rebase merging | `bool` | `false` | no | +| [github\_allow\_squash\_merge](#input\_github\_allow\_squash\_merge) | Allow squash merging | `bool` | `true` | no | +| [github\_auto\_init](#input\_github\_auto\_init) | Initialize repository with README | `bool` | `true` | no | +| [github\_codeowners\_team](#input\_github\_codeowners\_team) | n/a | `string` | `"terraform-reviewers"` | no | +| [github\_default\_branch](#input\_github\_default\_branch) | Default branch name | `string` | `"main"` | no | +| [github\_delete\_branch\_on\_merge](#input\_github\_delete\_branch\_on\_merge) | Delete head branch after merge | `bool` | `true` | no | +| [github\_dismiss\_stale\_reviews](#input\_github\_dismiss\_stale\_reviews) | Dismiss stale pull request approvals | `bool` | `true` | no | +| [github\_enforce\_admins\_branch\_protection](#input\_github\_enforce\_admins\_branch\_protection) | Enforce branch protection rules on administrators | `bool` | `true` | no | +| [github\_has\_issues](#input\_github\_has\_issues) | Enable issues feature | `bool` | `false` | no | +| [github\_has\_projects](#input\_github\_has\_projects) | Enable projects feature | `bool` | `true` | no | +| [github\_has\_wiki](#input\_github\_has\_wiki) | Enable wiki feature | `bool` | `true` | no | +| [github\_is\_private](#input\_github\_is\_private) | Make repository private | `bool` | `true` | no | +| [github\_org\_teams](#input\_github\_org\_teams) | Organization teams configuration | `list(any)` | `null` | no | +| [github\_push\_restrictions](#input\_github\_push\_restrictions) | List of team/user IDs with push access | `list(string)` | `[]` | no | +| [github\_repo\_description](#input\_github\_repo\_description) | Repository description | `string` | `null` | no | +| [github\_repo\_topics](#input\_github\_repo\_topics) | Repository topics | `list(string)` | `[]` | no | +| [github\_require\_code\_owner\_reviews](#input\_github\_require\_code\_owner\_reviews) | Require code owner review | `bool` | `true` | no | +| [github\_required\_approving\_review\_count](#input\_github\_required\_approving\_review\_count) | Number of approvals needed for pull requests | `number` | `1` | no | +| [gitignore\_template](#input\_gitignore\_template) | Gitignore template to use | `string` | `null` | no | +| [homepage\_url](#input\_homepage\_url) | Repository homepage URL | `string` | `null` | no | +| [is\_template](#input\_is\_template) | Make this repository a template | `bool` | `false` | no | +| [managed\_extra\_files](#input\_managed\_extra\_files) | Additional files to manage in the repository |
list(object({
path = string
content = string
}))
| `[]` | no | +| [name](#input\_name) | Name of the repository | `string` | n/a | yes | +| [prefix](#input\_prefix) | Prefix to add to repository name | `string` | `null` | no | +| [pull\_request\_bypassers](#input\_pull\_request\_bypassers) | Users/teams that can bypass pull request requirements | `list(string)` | `[]` | no | +| [repo\_org](#input\_repo\_org) | GitHub organization name | `string` | `null` | no | +| [required\_status\_checks](#input\_required\_status\_checks) | Required status checks for protected branches |
object({
contexts = list(string)
strict = optional(bool, false)
})
| `null` | no | +| [secrets](#input\_secrets) | GitHub Actions secrets |
list(object({
name = string
value = string
}))
| `[]` | no | +| [security\_and\_analysis](#input\_security\_and\_analysis) | Security and analysis settings for the repository |
object({
advanced_security = optional(object({
status = string
}), { status = "disabled" })
secret_scanning = optional(object({
status = string
}), { status = "disabled" })
secret_scanning_push_protection = optional(object({
status = string
}), { status = "disabled" })
})
| `null` | no | +| [template\_repo](#input\_template\_repo) | Template repository name | `string` | `null` | no | +| [template\_repo\_org](#input\_template\_repo\_org) | Template repository organization | `string` | `null` | no | +| [vars](#input\_vars) | GitHub Actions variables |
list(object({
name = string
value = string
}))
| `[]` | no | +| [vulnerability\_alerts](#input\_vulnerability\_alerts) | Enable Dependabot alerts | `bool` | `false` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [default\_branch](#output\_default\_branch) | Default branch of the repository | +| [full\_name](#output\_full\_name) | Full name of the repository in org/repo format | +| [git\_clone\_url](#output\_git\_clone\_url) | URL that can be provided to git clone to clone the repository anonymously via the git protocol | +| [github\_repo](#output\_github\_repo) | All attributes of the GitHub repository | +| [html\_url](#output\_html\_url) | URL to the repository on GitHub | +| [http\_clone\_url](#output\_http\_clone\_url) | URL that can be provided to git clone to clone the repository via HTTPS | +| [node\_id](#output\_node\_id) | Node ID of the repository, used for GraphQL API access | +| [repo\_id](#output\_repo\_id) | Repository ID | +| [ssh\_clone\_url](#output\_ssh\_clone\_url) | URL that can be provided to git clone to clone the repository via SSH | +| [template](#output\_template) | Template repository this repository was created from | +| [topics](#output\_topics) | List of topics applied to the repository | +| [visibility](#output\_visibility) | Whether the repository is private or public |