Skip to content

Commit

Permalink
Merge pull request #71 from schubergphilis/archive_on_destroy
Browse files Browse the repository at this point in the history
feature: add archive_on_destroy argument to the github_repository resource
  • Loading branch information
sdevriessbp authored Sep 20, 2024
2 parents 9e81f84 + 83e7fe2 commit b8fde25
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ No modules.
| <a name="input_allow_auto_merge"></a> [allow\_auto\_merge](#input\_allow\_auto\_merge) | Enable to allow auto-merging pull requests on the repository | `bool` | `false` | no |
| <a name="input_allow_rebase_merge"></a> [allow\_rebase\_merge](#input\_allow\_rebase\_merge) | To enable rebase merges on the repository | `bool` | `false` | no |
| <a name="input_allow_squash_merge"></a> [allow\_squash\_merge](#input\_allow\_squash\_merge) | To enable squash merges on the repository | `bool` | `false` | no |
| <a name="input_archive_on_destroy"></a> [archive\_on\_destroy](#input\_archive\_on\_destroy) | Set to true to archive the repository instead of deleting on destroy | `bool` | `false` | no |
| <a name="input_archived"></a> [archived](#input\_archived) | Specifies if the repository should be archived | `bool` | `false` | no |
| <a name="input_auto_init"></a> [auto\_init](#input\_auto\_init) | Disable to not produce an initial commit in the repository | `bool` | `true` | no |
| <a name="input_branches"></a> [branches](#input\_branches) | An optional map with GitHub branches to create | <pre>map(object({<br> source_branch = optional(string)<br> source_sha = optional(string)<br> use_branch_protection = optional(bool, true)<br><br> branch_protection = optional(object({<br> enforce_admins = optional(bool, false)<br> require_signed_commits = optional(bool, true)<br><br> required_checks = optional(object({<br> strict = optional(bool)<br> contexts = optional(list(string))<br> }))<br><br> restrict_pushes = optional(object({<br> blocks_creations = optional(bool)<br> push_allowances = optional(list(string))<br> }))<br><br> required_reviews = optional(object({<br> dismiss_stale_reviews = optional(bool, true)<br> dismissal_restrictions = optional(list(string))<br> required_approving_review_count = optional(number, 2)<br> require_code_owner_reviews = optional(bool, true)<br> }))<br> }), null)<br> }))</pre> | `{}` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ resource "github_repository" "default" {
allow_auto_merge = var.allow_auto_merge
allow_rebase_merge = var.allow_rebase_merge
allow_squash_merge = var.allow_squash_merge
archive_on_destroy = var.archive_on_destroy
archived = var.archived
auto_init = var.auto_init
delete_branch_on_merge = var.delete_branch_on_merge
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ variable "allow_squash_merge" {
description = "To enable squash merges on the repository"
}

variable "archive_on_destroy" {
type = bool
default = false
description = "Set to true to archive the repository instead of deleting on destroy"
}

variable "archived" {
type = bool
default = false
Expand Down

0 comments on commit b8fde25

Please sign in to comment.