Skip to content

Commit 351d028

Browse files
committed
fix variable and add depends on
1 parent e8d5558 commit 351d028

File tree

17 files changed

+25
-52
lines changed

17 files changed

+25
-52
lines changed

0-bootstrap/cb.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ module "tf_source" {
131131
}
132132

133133
# Remove after github.com/terraform-google-modules/terraform-google-bootstrap/issues/160
134-
depends_on = [module.seed_bootstrap]
134+
depends_on = [module.seed_bootstrap, module.organization_policies_type_boolean]
135135
}
136136

137137
module "tf_private_pool" {

0-bootstrap/main.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,5 @@ module "seed_bootstrap" {
9999

100100
sa_org_iam_permissions = []
101101

102-
depends_on = [module.required_group]
102+
depends_on = [module.required_group, module.organization_policies_type_boolean]
103103
}
104-

0-bootstrap/org_policy.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2021 Google LLC
2+
* Copyright 2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

1-org/envs/shared/README.md

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

44
| Name | Description | Type | Default | Required |
55
|------|-------------|------|---------|:--------:|
6-
| auto\_create\_network | Control whether the 'default' network will be created in the project. | `bool` | `true` | no |
76
| billing\_export\_dataset\_location | The location of the dataset for billing data export. | `string` | `null` | no |
87
| create\_access\_context\_manager\_access\_policy | Whether to create access context manager access policy. | `bool` | `true` | no |
98
| create\_unique\_tag\_key | Creates unique organization-wide tag keys by adding a random suffix to each key. | `bool` | `false` | no |

1-org/envs/shared/projects.tf

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module "org_audit_logs" {
4444
billing_account = local.billing_account
4545
folder_id = google_folder.common.id
4646
activate_apis = ["logging.googleapis.com", "bigquery.googleapis.com", "billingbudgets.googleapis.com"]
47-
auto_create_network = var.auto_create_network
47+
auto_create_network = true
4848

4949
labels = {
5050
environment = "common"
@@ -78,7 +78,7 @@ module "org_billing_export" {
7878
billing_account = local.billing_account
7979
folder_id = google_folder.common.id
8080
activate_apis = ["logging.googleapis.com", "bigquery.googleapis.com", "billingbudgets.googleapis.com"]
81-
auto_create_network = var.auto_create_network
81+
auto_create_network = true
8282

8383
labels = {
8484
environment = "common"
@@ -112,7 +112,8 @@ module "common_kms" {
112112
billing_account = local.billing_account
113113
folder_id = google_folder.common.id
114114
activate_apis = ["logging.googleapis.com", "cloudkms.googleapis.com", "billingbudgets.googleapis.com"]
115-
auto_create_network = var.auto_create_network
115+
auto_create_network = true
116+
116117

117118
labels = {
118119
environment = "common"
@@ -147,7 +148,8 @@ module "org_secrets" {
147148
billing_account = local.billing_account
148149
folder_id = google_folder.common.id
149150
activate_apis = ["logging.googleapis.com", "secretmanager.googleapis.com", "billingbudgets.googleapis.com"]
150-
auto_create_network = var.auto_create_network
151+
auto_create_network = true
152+
151153

152154
labels = {
153155
environment = "common"
@@ -181,7 +183,8 @@ module "interconnect" {
181183
billing_account = local.billing_account
182184
folder_id = google_folder.network.id
183185
activate_apis = ["billingbudgets.googleapis.com", "compute.googleapis.com"]
184-
auto_create_network = var.auto_create_network
186+
auto_create_network = true
187+
185188

186189
labels = {
187190
environment = "network"
@@ -215,7 +218,8 @@ module "scc_notifications" {
215218
billing_account = local.billing_account
216219
folder_id = google_folder.common.id
217220
activate_apis = ["logging.googleapis.com", "pubsub.googleapis.com", "securitycenter.googleapis.com", "billingbudgets.googleapis.com", "cloudkms.googleapis.com"]
218-
auto_create_network = var.auto_create_network
221+
auto_create_network = true
222+
219223

220224
labels = {
221225
environment = "common"
@@ -248,7 +252,8 @@ module "dns_hub" {
248252
org_id = local.org_id
249253
billing_account = local.billing_account
250254
folder_id = google_folder.network.id
251-
auto_create_network = var.auto_create_network
255+
auto_create_network = true
256+
252257

253258
activate_apis = [
254259
"compute.googleapis.com",
@@ -291,7 +296,8 @@ module "base_network_hub" {
291296
org_id = local.org_id
292297
billing_account = local.billing_account
293298
folder_id = google_folder.network.id
294-
auto_create_network = var.auto_create_network
299+
auto_create_network = true
300+
295301

296302
activate_apis = [
297303
"compute.googleapis.com",
@@ -342,7 +348,8 @@ module "restricted_network_hub" {
342348
org_id = local.org_id
343349
billing_account = local.billing_account
344350
folder_id = google_folder.network.id
345-
auto_create_network = var.auto_create_network
351+
auto_create_network = true
352+
346353

347354
activate_apis = [
348355
"compute.googleapis.com",

1-org/envs/shared/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,3 @@ variable "tfc_org_name" {
193193
type = string
194194
default = ""
195195
}
196-
197-
variable "auto_create_network" {
198-
description = "Control whether the 'default' network will be created in the project."
199-
type = bool
200-
default = true
201-
}

1-org/modules/network/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module "base_shared_vpc_host_project" {
2929
billing_account = var.billing_account
3030
folder_id = var.folder_id
3131
disable_services_on_destroy = false
32-
auto_create_network = var.auto_create_network
32+
auto_create_network = true
3333

3434
activate_apis = [
3535
"compute.googleapis.com",
@@ -66,7 +66,7 @@ module "restricted_shared_vpc_host_project" {
6666
billing_account = var.billing_account
6767
folder_id = var.folder_id
6868
disable_services_on_destroy = false
69-
auto_create_network = var.auto_create_network
69+
auto_create_network = true
7070

7171
activate_apis = [
7272
"compute.googleapis.com",

1-org/modules/network/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,3 @@ variable "project_budget" {
6464
})
6565
default = {}
6666
}
67-
68-
variable "auto_create_network" {
69-
description = "Control whether the 'default' network will be created in the project."
70-
type = bool
71-
default = true
72-
}

2-environments/modules/env_baseline/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
| Name | Description | Type | Default | Required |
55
|------|-------------|------|---------|:--------:|
66
| assured\_workload\_configuration | Assured Workload configuration. See https://cloud.google.com/assured-workloads ."<br> enabled: If the assured workload should be created.<br> location: The location where the workload will be created.<br> display\_name: User-assigned resource display name.<br> compliance\_regime: Supported Compliance Regimes. See https://cloud.google.com/assured-workloads/docs/reference/rest/Shared.Types/ComplianceRegime .<br> resource\_type: The type of resource. One of CONSUMER\_FOLDER, KEYRING, or ENCRYPTION\_KEYS\_PROJECT. | <pre>object({<br> enabled = optional(bool, false)<br> location = optional(string, "us-central1")<br> display_name = optional(string, "FEDRAMP-MODERATE")<br> compliance_regime = optional(string, "FEDRAMP_MODERATE")<br> resource_type = optional(string, "CONSUMER_FOLDER")<br> })</pre> | `{}` | no |
7-
| auto\_create\_network | Control whether the 'default' network will be created in the project. | `bool` | `true` | no |
87
| env | The environment to prepare (ex. development) | `string` | n/a | yes |
98
| environment\_code | A short form of the folder level resources (environment) within the Google Cloud organization (ex. d). | `string` | n/a | yes |
109
| project\_budget | Budget configuration for projects.<br> budget\_amount: The amount to use as the budget.<br> alert\_spent\_percents: A list of percentages of the budget to alert on when threshold is exceeded.<br> alert\_pubsub\_topic: The name of the Cloud Pub/Sub topic where budget related messages will be published, in the form of `projects/{project_id}/topics/{topic_id}`.<br> alert\_spend\_basis: The type of basis used to determine if spend has passed the threshold. Possible choices are `CURRENT_SPEND` or `FORECASTED_SPEND` (default). | <pre>object({<br> base_network_budget_amount = optional(number, 1000)<br> base_network_alert_spent_percents = optional(list(number), [1.2])<br> base_network_alert_pubsub_topic = optional(string, null)<br> base_network_budget_alert_spend_basis = optional(string, "FORECASTED_SPEND")<br> restricted_network_budget_amount = optional(number, 1000)<br> restricted_network_alert_spent_percents = optional(list(number), [1.2])<br> restricted_network_alert_pubsub_topic = optional(string, null)<br> restricted_network_budget_alert_spend_basis = optional(string, "FORECASTED_SPEND")<br> secret_budget_amount = optional(number, 1000)<br> secret_alert_spent_percents = optional(list(number), [1.2])<br> secret_alert_pubsub_topic = optional(string, null)<br> secret_budget_alert_spend_basis = optional(string, "FORECASTED_SPEND")<br> kms_budget_amount = optional(number, 1000)<br> kms_alert_spent_percents = optional(list(number), [1.2])<br> kms_alert_pubsub_topic = optional(string, null)<br> kms_budget_alert_spend_basis = optional(string, "FORECASTED_SPEND")<br> })</pre> | `{}` | no |

2-environments/modules/env_baseline/kms.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module "env_kms" {
3333
disable_services_on_destroy = false
3434
depends_on = [time_sleep.wait_60_seconds]
3535
activate_apis = ["logging.googleapis.com", "cloudkms.googleapis.com", "billingbudgets.googleapis.com"]
36-
auto_create_network = var.auto_create_network
36+
auto_create_network = true
3737

3838
labels = {
3939
environment = var.env

0 commit comments

Comments
 (0)