Skip to content

Commit f7a2cdc

Browse files
committed
update ingress settings to use variable and remove unused egress settings
1 parent f331d4e commit f7a2cdc

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

terraform/modules/run-service/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ resource "google_cloud_run_v2_service" "service" {
4444
location = var.region
4545

4646
deletion_protection = false
47-
ingress = "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"
47+
ingress = var.ingress_settings
4848

4949
template {
5050
service_account = var.service_account_email

terraform/modules/run-service/variables.tf

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,9 @@ variable "available_cpu" {
3535
}
3636
variable "ingress_settings" {
3737
type = string
38-
default = "ALLOW_ALL"
39-
description = "String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function."
38+
default = "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"
39+
description = "String value that controls what traffic can reach the function. Check ingress documentation to see the impact of each settings value. Changes to this field will recreate the cloud function."
4040
}
41-
variable "vpc_connector_egress_settings" {
42-
type = string
43-
default = null
44-
description = "The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value."
45-
}
46-
4741
variable "timeout" {
4842
default = "60s"
4943
type = string

0 commit comments

Comments
 (0)