diff --git a/main.tf b/main.tf index 1f0f8d8..2886ce7 100644 --- a/main.tf +++ b/main.tf @@ -11,6 +11,7 @@ resource "github_repository" "self" { allow_merge_commit = var.allow_merge_commit allow_rebase_merge = var.allow_rebase_merge allow_squash_merge = var.allow_squash_merge + archive_on_destroy = var.archive_on_destroy auto_init = true delete_branch_on_merge = true description = var.description diff --git a/variables.tf b/variables.tf index bac4d37..5e0044b 100644 --- a/variables.tf +++ b/variables.tf @@ -22,6 +22,12 @@ variable "allow_squash_merge" { type = bool } +variable "archive_on_destroy" { + default = false + description = "Set to true to archive the repository instead of deleting on destroy" + type = bool +} + variable "description" { description = "The description of the repository" type = string