From 5fae0a651ac19d82cc726dc361c076cd72490f99 Mon Sep 17 00:00:00 2001 From: Denis Irkhin Date: Tue, 23 Jul 2024 18:47:24 -0400 Subject: [PATCH 1/2] feat: add archive on destroy argument --- main.tf | 1 + variables.tf | 6 ++++++ 2 files changed, 7 insertions(+) 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..601a275 100644 --- a/variables.tf +++ b/variables.tf @@ -22,6 +22,12 @@ variable "allow_squash_merge" { type = bool } +variable "archive_on_destroy" { + default = true + 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 From 8fad69855924c656b0eaa65e7c5f976c274f60a8 Mon Sep 17 00:00:00 2001 From: Denis Irkhin Date: Tue, 23 Jul 2024 18:52:11 -0400 Subject: [PATCH 2/2] fix: set default to false --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 601a275..5e0044b 100644 --- a/variables.tf +++ b/variables.tf @@ -23,7 +23,7 @@ variable "allow_squash_merge" { } variable "archive_on_destroy" { - default = true + default = false description = "Set to true to archive the repository instead of deleting on destroy" type = bool }