terraform-google-lb-internal icon indicating copy to clipboard operation
terraform-google-lb-internal copied to clipboard

forwarding_rule support argument network_tier

Open TedCat opened this issue 1 year ago • 5 comments

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

TedCat avatar Nov 01 '23 06:11 TedCat

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

github-actions[bot] avatar Dec 31 '23 23:12 github-actions[bot]

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

github-actions[bot] avatar Mar 02 '24 23:03 github-actions[bot]

@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

imrannayer avatar May 02 '24 15:05 imrannayer

@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.

tmetn avatar May 22 '24 10:05 tmetn

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

github-actions[bot] avatar Jul 21 '24 23:07 github-actions[bot]