Skip to content

Commit 384f72d

Browse files
committed
removed sub-module. Added in core_projectfactory
1 parent f83c0d1 commit 384f72d

File tree

13 files changed

+25
-168
lines changed

13 files changed

+25
-168
lines changed

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ There are multiple examples included in the [examples](./examples/) folder but s
2929
```hcl
3030
module "project-factory" {
3131
source = "terraform-google-modules/project-factory/google"
32-
version = "~> 15.0"
32+
version = "~> 16.0"
3333
3434
name = "pf-test-1"
3535
random_project_id = true
@@ -132,7 +132,6 @@ determining that location is as follows:
132132
| budget\_display\_name | The display name of the budget. If not set defaults to `Budget For <projects[0]|All Projects>` | `string` | `null` | no |
133133
| budget\_labels | A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. | `map(string)` | `{}` | no |
134134
| budget\_monitoring\_notification\_channels | A list of monitoring notification channels in the form `[projects/{project_id}/notificationChannels/{channel_id}]`. A maximum of 5 channels are allowed. | `list(string)` | `[]` | no |
135-
| cloud\_armor\_tier | Managed protection tier to be set. Possible values are: CA\_STANDARD, CA\_ENTERPRISE\_PAYGO. If not set, then project will be set to default Standard protection | `string` | `null` | no |
136135
| consumer\_quotas | The quotas configuration you want to override for the project. | <pre>list(object({<br> service = string,<br> metric = string,<br> dimensions = map(string),<br> limit = string,<br> value = string,<br> }))</pre> | `[]` | no |
137136
| create\_project\_sa | Whether the default service account for the project shall be created | `bool` | `true` | no |
138137
| default\_network\_tier | Default Network Service Tier for resources created in this project. If unset, the value will not be modified. See https://cloud.google.com/network-tiers/docs/using-network-service-tiers and https://cloud.google.com/network-tiers. | `string` | `""` | no |
@@ -174,7 +173,6 @@ determining that location is as follows:
174173
| api\_s\_account | API service account email |
175174
| api\_s\_account\_fmt | API service account email formatted for terraform use |
176175
| budget\_name | The name of the budget if created |
177-
| cloud\_armor\_tier | Managed protection tier to be set. If not set, then project will be set to default Standard protection |
178176
| domain | The organization's domain |
179177
| enabled\_api\_identities | Enabled API identities in the project |
180178
| enabled\_apis | Enabled APIs in the project |

main.tf

-10
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,3 @@ module "essential_contacts" {
129129
essential_contacts = var.essential_contacts
130130
language_tag = var.language_tag
131131
}
132-
133-
/******************************************
134-
Cloud Armor tier of the project
135-
*****************************************/
136-
module "cloud_armor_tier" {
137-
source = "./modules/cloud_armor_tier"
138-
139-
project_id = module.project-factory.project_id
140-
cloud_armor_tier = var.cloud_armor_tier
141-
}

modules/cloud_armor_tier/README.md

-38
This file was deleted.

modules/cloud_armor_tier/main.tf

-26
This file was deleted.

modules/cloud_armor_tier/outputs.tf

-25
This file was deleted.

modules/cloud_armor_tier/variables.tf

-25
This file was deleted.

modules/cloud_armor_tier/versions.tf

-28
This file was deleted.

modules/core_project_factory/main.tf

+11
Original file line numberDiff line numberDiff line change
@@ -388,3 +388,14 @@ resource "google_tags_tag_binding" "bindings" {
388388
parent = "//cloudresourcemanager.googleapis.com/projects/${google_project.main.number}"
389389
tag_value = "tagValues/${each.value}"
390390
}
391+
392+
/******************************************
393+
Cloud Armor tier of the project
394+
*****************************************/
395+
396+
resource "google_compute_project_cloud_armor_tier" "cloud_armor_tier_config" {
397+
count = var.cloud_armor_tier == null ? 0 : 1
398+
399+
project = var.project_id
400+
cloud_armor_tier = var.cloud_armor_tier
401+
}

modules/core_project_factory/outputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,8 @@ output "usage_report_export_bucket" {
105105
description = "GCE usage reports bucket"
106106
value = try(google_project_usage_export_bucket.usage_report_export[0], null)
107107
}
108+
109+
output "cloud_armor_tier" {
110+
description = "Cloud Armor tier for the project"
111+
value = var.cloud_armor_tier
112+
}

modules/core_project_factory/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -270,3 +270,9 @@ variable "tag_binding_values" {
270270
type = list(string)
271271
default = []
272272
}
273+
274+
variable "cloud_armor_tier" {
275+
description = "Managed protection tier to be set. Possible values are: CA_STANDARD, CA_ENTERPRISE_PAYGO"
276+
type = string
277+
default = null
278+
}

modules/core_project_factory/versions.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ terraform {
2020
required_providers {
2121
google = {
2222
source = "hashicorp/google"
23-
version = ">= 5.22, < 6"
23+
version = ">= 5.33, < 6"
2424
}
2525
google-beta = {
2626
source = "hashicorp/google-beta"
27-
version = ">= 5.22, < 6"
27+
version = ">= 5.33, < 6"
2828
}
2929
null = {
3030
source = "hashicorp/null"

outputs.tf

-5
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,3 @@ output "usage_report_export_bucket" {
108108
description = "GCE usage reports bucket"
109109
value = module.project-factory.usage_report_export_bucket
110110
}
111-
112-
output "cloud_armor_tier" {
113-
description = "Managed protection tier to be set. If not set, then project will be set to default Standard protection"
114-
value = var.cloud_armor_tier
115-
}

variables.tf

-6
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,3 @@ variable "tag_binding_values" {
359359
type = list(string)
360360
default = []
361361
}
362-
363-
variable "cloud_armor_tier" {
364-
description = "Managed protection tier to be set. Possible values are: CA_STANDARD, CA_ENTERPRISE_PAYGO. If not set, then project will be set to default Standard protection"
365-
type = string
366-
default = null
367-
}

0 commit comments

Comments
 (0)