Skip to content

Commit

Permalink
feat: add deletion_policy
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody committed Sep 5, 2024
1 parent 7414025 commit 7511e81
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions modules/core_project_factory/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ resource "google_project" "main" {
folder_id = local.project_folder_id
billing_account = var.billing_account
auto_create_network = var.auto_create_network
deletion_policy = var.deletion_policy

labels = var.labels

Expand Down
6 changes: 6 additions & 0 deletions modules/core_project_factory/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,9 @@ variable "cloud_armor_tier" {
type = string
default = null
}

variable "deletion_policy" {
description = "The deletion policy for the project."
type = string
default = null
}
4 changes: 2 additions & 2 deletions modules/core_project_factory/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.33, < 6"
version = ">= 5.41, < 6"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.33, < 6"
version = ">= 5.41, < 6"
}
null = {
source = "hashicorp/null"
Expand Down
1 change: 1 addition & 0 deletions modules/fabric-project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module "project_myproject" {
| auto\_create\_network | Whether to create the default network for the project | `bool` | `false` | no |
| billing\_account | Billing account id. | `string` | `""` | no |
| custom\_roles | Map of role name => comma-delimited list of permissions to create in this project. | `map(string)` | `{}` | no |
| deletion\_policy | The deletion policy for the project. | `string` | `null` | no |
| editors | Optional list of IAM-format members to set as project editor. | `list(string)` | `[]` | no |
| extra\_bindings\_members | List of comma-delimited IAM-format members for additional IAM bindings, one item per role. | `list(string)` | `[]` | no |
| extra\_bindings\_roles | List of roles for additional IAM bindings, pair with members list below. | `list(string)` | `[]` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/fabric-project/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ resource "google_project" "project" {
billing_account = var.billing_account
auto_create_network = var.auto_create_network
labels = var.labels
deletion_policy = var.deletion_policy
}

resource "google_project_service" "project_services" {
Expand Down
5 changes: 5 additions & 0 deletions modules/fabric-project/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,8 @@ variable "labels" {
default = {}
}

variable "deletion_policy" {
description = "The deletion policy for the project."
type = string
default = null
}
4 changes: 2 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 5.33, < 6"
version = ">= 5.41, < 6"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 5.33, < 6"
version = ">= 5.41, < 6"
}
}
provider_meta "google" {
Expand Down

0 comments on commit 7511e81

Please sign in to comment.