terraform-google-lb-internal
terraform-google-lb-internal copied to clipboard
forwarding_rule support argument network_tier
TL;DR
i'm try to create a tcp internal lb, hit error Error "creating ForwardingRule: googleapi: Error 400: STANDARD network tier (the project's default network tier) is not supported: Network tier other than PREMIUM is not supported for loadBalancingScheme=INTERNAL., badRequest"
Expected behavior
support argument network_tier for google_compute_forwarding_rule
Observed behavior
My Project Network Service Tier config is Standard, ip_address is not set. The error pops up when creating resource. Bypassing this issue, I have to define the network_tier to "PREMIUM" explicitly in google_compute_forwarding_rule.
Terraform Configuration
resource "google_compute_forwarding_rule" "default" {
project = var.project
name = var.name
region = var.region
network = data.google_compute_network.network.self_link
subnetwork = data.google_compute_subnetwork.network.self_link
network_tier = "PREMIUM"
allow_global_access = var.global_access
load_balancing_scheme = "INTERNAL"
backend_service = google_compute_region_backend_service.default.self_link
ip_address = var.ip_address
ip_protocol = var.ip_protocol
ports = var.ports
all_ports = var.all_ports
service_label = var.service_label
labels = var.labels
}
module "test_ilb" {
source = "GoogleCloudPlatform/lb-internal/google"
version = "~> 5.0"
project = var.project_id
global_access = false
network = data.google_compute_network.my-network.name
subnetwork = data.google_compute_subnetwork.my-subnetwork.name
region = var.region
name = local.resource_name
ports = ["8080"]
source_tags = []
target_tags = []
backends = []
health_check = local.health_check
}
Terraform Version
$ terraform version
Terraform v1.3.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v4.84.0
+ provider registry.terraform.io/hashicorp/google-beta v4.84.0
+ provider registry.terraform.io/hashicorp/random v3.5.1
Additional information
No response
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days
@TedCat According to this doc internal load balancer is only supported for Premium tier.
https://cloud.google.com/load-balancing/docs/choosing-load-balancer#summary-gclb
@TedCat According to this doc internal load balancer is only supported for Premium tier.
https://cloud.google.com/load-balancing/docs/choosing-load-balancer#summary-gclb
For educational purposes, I think this could be revisited.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days