Add a project_skip_delete variable to optionally let the project stick around after the resources are destroyed.
This commit is contained in:
@@ -200,6 +200,7 @@ module "project" {
|
||||
| *policy_list* | Map of list org policies, status is true for allow, false for deny, null for restore. Values can only be used for allow or deny. | <code title="map(object({ inherit_from_parent = bool suggested_value = string status = bool values = list(string) }))">map(object({...}))</code> | | <code title="">{}</code> |
|
||||
| *prefix* | Prefix used to generate project id and name. | <code title="">string</code> | | <code title="">null</code> |
|
||||
| *project_create* | Create project. When set to false, uses a data source to reference existing project. | <code title="">bool</code> | | <code title="">true</code> |
|
||||
| *project_skip_delete* | Allows the underlying resources to be destroyed without destroying the project itself. | <code title="">bool</code> | | <code title="">false</code> |
|
||||
| *service_config* | Configure service API activation. | <code title="object({ disable_on_destroy = bool disable_dependent_services = bool })">object({...})</code> | | <code title="{ disable_on_destroy = true disable_dependent_services = true }">...</code> |
|
||||
| *service_encryption_key_ids* | Cloud KMS encryption key in {SERVICE => [KEY_URL]} format. | <code title="map(list(string))">map(list(string))</code> | | <code title="">{}</code> |
|
||||
| *service_perimeter_bridges* | Name of VPC-SC Bridge perimeters to add project into. Specify the name in the form of 'accessPolicies/ACCESS_POLICY_NAME/servicePerimeters/PERIMETER_NAME'. | <code title="list(string)">list(string)</code> | | <code title="">null</code> |
|
||||
|
||||
@@ -91,6 +91,7 @@ resource "google_project" "project" {
|
||||
billing_account = var.billing_account
|
||||
auto_create_network = var.auto_create_network
|
||||
labels = var.labels
|
||||
skip_delete = var.project_skip_delete
|
||||
}
|
||||
|
||||
resource "google_project_iam_custom_role" "roles" {
|
||||
|
||||
@@ -162,6 +162,12 @@ variable "project_create" {
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "project_skip_delete" {
|
||||
description = "Allows the underlying resources to be destroyed without destroying the project itself."
|
||||
type = bool
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "service_config" {
|
||||
description = "Configure service API activation."
|
||||
type = object({
|
||||
|
||||
Reference in New Issue
Block a user