Skip to content

Commit 7f29131

Browse files
committed
chore: upgrade modules to terraform provider v6
1 parent 3e4302d commit 7f29131

File tree

35 files changed

+128
-21
lines changed

35 files changed

+128
-21
lines changed

0-bootstrap/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ Each step has instructions for this change.
361361
| default\_region\_2 | Secondary default region to create resources where applicable. | `string` | `"us-west1"` | no |
362362
| default\_region\_gcs | Case-Sensitive default region to create gcs resources where applicable. | `string` | `"US"` | no |
363363
| default\_region\_kms | Secondary default region to create kms resources where applicable. | `string` | `"us"` | no |
364+
| folder\_deletion\_protection | Prevent Terraform from destroying or recreating the folder. | `string` | `true` | no |
364365
| folder\_prefix | Name prefix to use for folders created. Should be the same in all steps. | `string` | `"fldr"` | no |
365366
| groups | Contain the details of the Groups to be created. | <pre>object({<br> create_required_groups = optional(bool, false)<br> create_optional_groups = optional(bool, false)<br> billing_project = optional(string, null)<br> required_groups = object({<br> group_org_admins = string<br> group_billing_admins = string<br> billing_data_users = string<br> audit_data_users = string<br> })<br> optional_groups = optional(object({<br> gcp_security_reviewer = optional(string, "")<br> gcp_network_viewer = optional(string, "")<br> gcp_scc_admin = optional(string, "")<br> gcp_global_secrets_admin = optional(string, "")<br> gcp_kms_admin = optional(string, "")<br> }), {})<br> })</pre> | n/a | yes |
366367
| initial\_group\_config | Define the group configuration when it is initialized. Valid values are: WITH\_INITIAL\_OWNER, EMPTY and INITIAL\_GROUP\_CONFIG\_UNSPECIFIED. | `string` | `"WITH_INITIAL_OWNER"` | no |

0-bootstrap/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ locals {
3535
}
3636

3737
resource "google_folder" "bootstrap" {
38-
display_name = "${var.folder_prefix}-bootstrap"
39-
parent = local.parent
38+
display_name = "${var.folder_prefix}-bootstrap"
39+
parent = local.parent
40+
deletion_protection = var.folder_deletion_protection
4041
}
4142

4243
module "seed_bootstrap" {

0-bootstrap/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ variable "project_deletion_policy" {
9696
default = "PREVENT"
9797
}
9898

99+
variable "folder_deletion_protection" {
100+
description = "Prevent Terraform from destroying or recreating the folder."
101+
type = string
102+
default = true
103+
}
104+
99105
/* ----------------------------------------
100106
Specific to Groups creation
101107
---------------------------------------- */

1-org/envs/shared/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
| enforce\_allowed\_worker\_pools | Whether to enforce the organization policy restriction on allowed worker pools for Cloud Build. | `bool` | `false` | no |
1313
| essential\_contacts\_domains\_to\_allow | The list of domains that email addresses added to Essential Contacts can have. | `list(string)` | n/a | yes |
1414
| essential\_contacts\_language | Essential Contacts preferred language for notifications, as a ISO 639-1 language code. See [Supported languages](https://cloud.google.com/resource-manager/docs/managing-notification-contacts#supported-languages) for a list of supported languages. | `string` | `"en"` | no |
15+
| folder\_deletion\_protection | Prevent Terraform from destroying or recreating the folder. | `string` | `true` | no |
1516
| gcp\_groups | Groups to grant specific roles in the Organization.<br> platform\_viewer: Google Workspace or Cloud Identity group that have the ability to view resource information across the Google Cloud organization.<br> security\_reviewer: Google Workspace or Cloud Identity group that members are part of the security team responsible for reviewing cloud security<br> network\_viewer: Google Workspace or Cloud Identity group that members are part of the networking team and review network configurations.<br> scc\_admin: Google Workspace or Cloud Identity group that can administer Security Command Center.<br> audit\_viewer: Google Workspace or Cloud Identity group that members are part of an audit team and view audit logs in the logging project.<br> global\_secrets\_admin: Google Workspace or Cloud Identity group that members are responsible for putting secrets into Secrets Manage | <pre>object({<br> audit_viewer = optional(string, null)<br> security_reviewer = optional(string, null)<br> network_viewer = optional(string, null)<br> scc_admin = optional(string, null)<br> global_secrets_admin = optional(string, null)<br> kms_admin = optional(string, null)<br> })</pre> | `{}` | no |
1617
| log\_export\_storage\_force\_destroy | (Optional) If set to true, delete all contents when destroying the resource; otherwise, destroying the resource will fail if contents are present. | `bool` | `false` | no |
1718
| log\_export\_storage\_location | The location of the storage bucket used to export logs. | `string` | `null` | no |

1-org/envs/shared/folders.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
*****************************************/
2020

2121
resource "google_folder" "common" {
22-
display_name = "${local.folder_prefix}-common"
23-
parent = local.parent
22+
display_name = "${local.folder_prefix}-common"
23+
parent = local.parent
24+
deletion_protection = var.folder_deletion_protection
2425
}
2526

2627
resource "google_folder" "network" {
27-
display_name = "${local.folder_prefix}-network"
28-
parent = local.parent
28+
display_name = "${local.folder_prefix}-network"
29+
parent = local.parent
30+
deletion_protection = var.folder_deletion_protection
2931
}

1-org/envs/shared/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,9 @@ variable "project_deletion_policy" {
199199
type = string
200200
default = "PREVENT"
201201
}
202+
203+
variable "folder_deletion_protection" {
204+
description = "Prevent Terraform from destroying or recreating the folder."
205+
type = string
206+
default = true
207+
}

2-environments/envs/development/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
| Name | Description | Type | Default | Required |
55
|------|-------------|------|---------|:--------:|
6+
| folder\_deletion\_protection | Prevent Terraform from destroying or recreating the folder. | `string` | `true` | no |
67
| project\_deletion\_policy | The deletion policy for the project created. | `string` | `"PREVENT"` | no |
78
| remote\_state\_bucket | Backend bucket to load Terraform Remote State Data from previous steps. | `string` | n/a | yes |
89
| tfc\_org\_name | Name of the TFC organization | `string` | `""` | no |

2-environments/envs/development/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ module "env" {
2222
remote_state_bucket = var.remote_state_bucket
2323
tfc_org_name = var.tfc_org_name
2424

25-
project_deletion_policy = var.project_deletion_policy
25+
project_deletion_policy = var.project_deletion_policy
26+
folder_deletion_protection = var.folder_deletion_protection
2627
}

2-environments/envs/development/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@ variable "project_deletion_policy" {
3030
type = string
3131
default = "PREVENT"
3232
}
33+
34+
variable "folder_deletion_protection" {
35+
description = "Prevent Terraform from destroying or recreating the folder."
36+
type = string
37+
default = true
38+
}

2-environments/envs/nonproduction/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
| Name | Description | Type | Default | Required |
55
|------|-------------|------|---------|:--------:|
6+
| folder\_deletion\_protection | Prevent Terraform from destroying or recreating the folder. | `string` | `true` | no |
67
| project\_deletion\_policy | The deletion policy for the project created. | `string` | `"PREVENT"` | no |
78
| remote\_state\_bucket | Backend bucket to load Terraform Remote State Data from previous steps. | `string` | n/a | yes |
89
| tfc\_org\_name | Name of the TFC organization | `string` | `""` | no |

0 commit comments

Comments
 (0)