Skip to content

Commit

Permalink
Opst 1770 (#247)
Browse files Browse the repository at this point in the history
* fix: update the google provider version

Signed-off-by: Basma1912 <[email protected]>

* fix: change the value of deletion_policy to Prevent for project contains bastion

Signed-off-by: Basma1912 <[email protected]>

* fix: change the deletion_policy to variable - default is ABANDON

Signed-off-by: Basma1912 <[email protected]>

* fix: change the deletion_policy to variable - default is ABANDON

Signed-off-by: Basma1912 <[email protected]>

---------

Signed-off-by: Basma1912 <[email protected]>
  • Loading branch information
Basma1912 authored Jan 7, 2025
1 parent 98c0133 commit 0988f49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion google_project/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "random_id" "project" {
resource "google_project" "project" {
name = local.display_name
project_id = local.project_id
deletion_policy = "ABANDON"
deletion_policy = var.deletion_policy

billing_account = var.billing_account_id
folder_id = var.parent_id
Expand Down
6 changes: 6 additions & 0 deletions google_project/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@ variable "log_analytics" {
description = "Enable log analytics for _Default log bucket"
default = false
}

variable "deletion_policy" {
default = "ABANDON"
description = "The deletion policy for the Project."
type = string
}

0 comments on commit 0988f49

Please sign in to comment.