diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl index 18b0383..1f21c16 100644 --- a/.terraform.lock.hcl +++ b/.terraform.lock.hcl @@ -2,23 +2,23 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/integrations/github" { - version = "6.5.0" + version = "6.6.0" hashes = [ - "h1:KN6W+TRczQXMQLAI5Cn/xpvJzq8r+/AQCZaxGURXQ3A=", - "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", + "h1:Fp0RrNe+w167AQkVUWC1WRAsyjhhHN7aHWUky7VkKW8=", + "zh:0b1b5342db6a17de7c71386704e101be7d6761569e03fb3ff1f3d4c02c32d998", + "zh:2fb663467fff76852126b58315d9a1a457e3b04bec51f04bf1c0ddc9dfbb3517", + "zh:4183e557a1dfd413dae90ca4bac37dbbe499eae5e923567371f768053f977800", + "zh:48b2979f88fb55cdb14b7e4c37c44e0dfbc21b7a19686ce75e339efda773c5c2", + "zh:5d803fb06625e0bcf83abb590d4235c117fa7f4aa2168fa3d5f686c41bc529ec", + "zh:6f1dd094cbab36363583cda837d7ca470bef5f8abf9b19f23e9cd8b927153498", + "zh:772edb5890d72b32868f9fdc0a9a1d4f4701d8e7f8acb37a7ac530d053c776e3", + "zh:798f443dbba6610431dcef832047f6917fb5a4e184a3a776c44e6213fb429cc6", + "zh:cc08dfcc387e2603f6dbaff8c236c1254185450d6cadd6bad92879fe7e7dbce9", + "zh:d5e2c8d7f50f91d6847ddce27b10b721bdfce99c1bbab42a68fa271337d73d63", + "zh:e69a0045440c706f50f84a84ff8b1df520ec9bf757de4b8f9959f2ed20c3f440", + "zh:efc5358573a6403cbea3a08a2fcd2407258ac083d9134c641bdcb578966d8bdf", + "zh:f627a255e5809ec2375f79949c79417847fa56b9e9222ea7c45a463eb663f137", + "zh:f7c02f762e4cf1de7f58bde520798491ccdd54a5bd52278d579c146d1d07d4f0", "zh:fbd1fee2c9df3aa19cf8851ce134dea6e45ea01cb85695c1726670c285797e25", ] } diff --git a/README.md b/README.md index 0769638..d93fc7c 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,7 @@ No requirements. | Name | Version | |------|---------| -| [github](#provider\_github) | 6.5.0 | +| [github](#provider\_github) | 6.6.0 | ## Modules @@ -246,7 +246,7 @@ No modules. | [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_branch_protection.protection](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 | @@ -254,13 +254,12 @@ No modules. | [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_team.environment_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.environment_users](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 @@ -269,43 +268,58 @@ No modules. |------|-------------|------|---------|:--------:| | [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 | +| [allow\_unsigned\_files](#input\_allow\_unsigned\_files) | Whether to allow file management even when signed commits are required | `bool` | `false` | 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 | +| [commit\_author](#input\_commit\_author) | The author name to use for file commits | `string` | `"Terraform"` | no | +| [commit\_email](#input\_commit\_email) | The email to use for file commits | `string` | `"terraform@roknsound.com"` | 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\_auto\_merge](#input\_github\_allow\_auto\_merge) | Allow pull requests to be automatically merged | `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\_allow\_update\_branch](#input\_github\_allow\_update\_branch) | Allow updating pull request branches | `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\_discussions](#input\_github\_has\_discussions) | Enable discussions feature | `bool` | `false` | no | +| [github\_has\_downloads](#input\_github\_has\_downloads) | Enable downloads feature | `bool` | `false` | 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\_merge\_commit\_message](#input\_github\_merge\_commit\_message) | Message for merge commits | `string` | `"PR_TITLE"` | no | +| [github\_merge\_commit\_title](#input\_github\_merge\_commit\_title) | Title for merge commits | `string` | `"MERGE_MESSAGE"` | no | | [github\_org\_teams](#input\_github\_org\_teams) | Organization teams configuration | `list(any)` | `null` | no | +| [github\_pro\_enabled](#input\_github\_pro\_enabled) | Is this a Github Pro Account? If not, then it's limited in feature set | `bool` | `false` | 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 | +| [github\_squash\_merge\_commit\_message](#input\_github\_squash\_merge\_commit\_message) | Message for squash merge commits | `string` | `"COMMIT_MESSAGES"` | no | +| [github\_squash\_merge\_commit\_title](#input\_github\_squash\_merge\_commit\_title) | Title for squash merge commits | `string` | `"COMMIT_OR_PR_TITLE"` | 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 | +| [license\_template](#input\_license\_template) | License template to use for the repository | `string` | `null` | 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 | +| [pages\_config](#input\_pages\_config) | Configuration for GitHub Pages |
object({
branch = optional(string, "gh-pages")
path = optional(string, "/")
cname = optional(string)
})
| `null` | no | | [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 | +| [require\_last\_push\_approval](#input\_require\_last\_push\_approval) | Require approval from the last pusher | `bool` | `false` | no | +| [require\_signed\_commits](#input\_require\_signed\_commits) | Whether to require signed commits for the default branch | `bool` | `false` | 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 | diff --git a/github_files.tf b/github_files.tf index 57c8de3..e4dee3a 100644 --- a/github_files.tf +++ b/github_files.tf @@ -15,7 +15,7 @@ resource "github_repository_file" "codeowners" { commit_author = var.commit_author commit_email = var.commit_email overwrite_on_create = true - depends_on = [ + depends_on = [ github_repository.repo, github_branch_protection.protection ] @@ -63,7 +63,7 @@ resource "github_repository_file" "extra_files" { commit_author = var.commit_author commit_email = var.commit_email overwrite_on_create = true - depends_on = [ + depends_on = [ github_repository.repo, github_branch_protection.protection ] @@ -86,7 +86,7 @@ resource "github_repository_file" "managed_extra_files" { commit_author = var.commit_author commit_email = var.commit_email overwrite_on_create = true - depends_on = [ + depends_on = [ github_repository.repo, github_branch_protection.protection ]