Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add network service tier setting #640

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module "project-factory" {
disable_dependent_services = var.disable_dependent_services
vpc_service_control_attach_enabled = var.vpc_service_control_attach_enabled
vpc_service_control_perimeter_name = var.vpc_service_control_perimeter_name
default_network_tier = var.default_network_tier
}

/******************************************
Expand Down
9 changes: 9 additions & 0 deletions modules/core_project_factory/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,12 @@ resource "google_project_service" "enable_access_context_manager" {
project = google_project.main.number
service = "accesscontextmanager.googleapis.com"
}

/******************************************
Configure default Network Service Tier
*****************************************/
resource "google_compute_project_default_network_tier" "default" {
count = var.default_network_tier != "" ? 1 : 0
morgante marked this conversation as resolved.
Show resolved Hide resolved
project = google_project.main.number
network_tier = var.default_network_tier
}
8 changes: 7 additions & 1 deletion modules/core_project_factory/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ variable "bucket_versioning" {

variable "bucket_labels" {
description = " A map of key/value label pairs to assign to the bucket (optional)"
type = map
type = map(any)
jawnsy marked this conversation as resolved.
Show resolved Hide resolved
default = {}
}

Expand Down Expand Up @@ -227,3 +227,9 @@ variable "vpc_service_control_perimeter_name" {
type = string
default = null
}

variable "default_network_tier" {
description = "Default Network Service Tier for resources created in this project. See https://cloud.google.com/network-tiers/docs/using-network-service-tiers and https://cloud.google.com/network-tiers."
type = string
default = ""
}
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ variable "bucket_versioning" {

variable "bucket_labels" {
description = " A map of key/value label pairs to assign to the bucket (optional)"
type = map
type = map(any)
default = {}
}

Expand Down Expand Up @@ -275,3 +275,9 @@ variable "consumer_quotas" {
}))
default = []
}

variable "default_network_tier" {
description = "Default Network Service Tier for resources created in this project. See https://cloud.google.com/network-tiers/docs/using-network-service-tiers and https://cloud.google.com/network-tiers."
jawnsy marked this conversation as resolved.
Show resolved Hide resolved
type = string
default = ""
}