PaloAltoNetworks / terraform-google-swfw-modules

Terraform Reusable Modules for Software Firewalls on GCP
https://registry.terraform.io/modules/PaloAltoNetworks/swfw-modules/google
MIT License
5 stars 8 forks source link

LB module not setting balancing mode correctly. #34

Closed jollymahn closed 2 months ago

jollymahn commented 2 months ago

Describe the bug

ERROR problem occurs for both lb_internal and lb_external

module.vpc_peering["trust-to-spoke2"].google_compute_network_peering.peer: Creation complete after 1m7s [id=sj-az-lab-fw-spoke2-vpc/sj-az-lab-fw-spoke2-vpc-sj-az-lab-fw-trust-vpc]
╷
│ Error: Error creating RegionBackendService: googleapi: Error 400: Invalid value for field 'resource.backends[0].balancingMode': 'UTILIZATION'. Balancing mode must be CONNECTION for an INTERNAL backend service., invalid
│ 
│   with module.lb_internal["internal-lb"].google_compute_region_backend_service.this,
│   on ../../modules/lb_internal/main.tf line 10, in resource "google_compute_region_backend_service" "this":
│   10: resource "google_compute_region_backend_service" "this" {
│ 
╵

PERMALINK

https://github.com/PaloAltoNetworks/terraform-google-swfw-modules/blob/bbd9e72306a20cf5ae4f86709c9cf670ca024d86/modules/lb_internal/main.tf#L23

RESOLUTION

 dynamic "backend" {
    for_each = var.backends
    content {
      group    = backend.value
      failover = false
      balancing_mode = "CONNECTION"
    }
  }

Module Version

2.0.6

Terraform version

1.6.0

Expected behavior

successful LB deployment.

Current behavior

can not deploy load balancer frontend because backend not in supported mode.

Anything else to add?

dynamic "backend" { for_each = var.backends content { group = backend.value failover = false balancing_mode = "CONNECTION" } }

pavelrn commented 2 months ago

Hi @jollymahn ! What is terraform providers --version in your case?

jollymahn commented 2 months ago

M-L652YK23YP:.ssh sjolly$ terraform --version

Terraform v1.6.0

on darwin_arm64

Your version of Terraform is out of date! The latest version

is 1.9.5. You can update by downloading from https://www.terraform.io/downloads.html

well, looks like its out of date... ill update it and try again.

Thank you!!

Sean

Are you running a Preferred Software Release? https://live.paloaltonetworks.com/t5/Customer-Resources/Support-PAN-OS-Software-Release-Guidance/ta-p/258304 Click here for the latest information.

Sean Jolly | Principal Professional Services Consultant- East Coast

Home Office: Knoxville, TN

HQ: Palo Alto Networks | 3000 Tannery Way | Santa Clara, CA 95054 | USA

Mobile: 865-804-3093 | www.paloaltonetworks.com https://www.paloaltonetworks.com/

https://www.paloaltonetworks.com/ https://www.linkedin.com/company/palo-alto-networks https://www.facebook.com/PaloAltoNetworks/ https://twitter.com/PaloAltoNtwks

On Wed, Sep 11, 2024 at 4:14 AM pavelrn @.***> wrote:

Hi @jollymahn https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jollymahn&d=DwMFaQ&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=Jouih89xD-Ge26reGBMzY9-SOrbeprxymavXc0qc1aQ&m=spcu_NRmBNTjlB1R2XnQQXFAKcJ5CTafrmrNKvhLNtzJ1_IT-4yLPd3gxqAReovh&s=dDTf97fgqhZRUTP4cbNz8lSk7c2tXfHtWIENzOCLJ4Y&e= ! What is terraform providers --version in your case?

— Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_PaloAltoNetworks_terraform-2Dgoogle-2Dswfw-2Dmodules_issues_34-23issuecomment-2D2342961347&d=DwMFaQ&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=Jouih89xD-Ge26reGBMzY9-SOrbeprxymavXc0qc1aQ&m=spcu_NRmBNTjlB1R2XnQQXFAKcJ5CTafrmrNKvhLNtzJ1_IT-4yLPd3gxqAReovh&s=u3BQbAGcl2OlnoxJcL-5C_WHVquvdO2T_bi3uN580aE&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AOUY73CM7E2KUGLJNYPS4B3ZV73VPAVCNFSM6AAAAABNZJKFIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBSHE3DCMZUG4&d=DwMFaQ&c=V9IgWpI5PvzTw83UyHGVSoW3Uc1MFWe5J8PTfkrzVSo&r=Jouih89xD-Ge26reGBMzY9-SOrbeprxymavXc0qc1aQ&m=spcu_NRmBNTjlB1R2XnQQXFAKcJ5CTafrmrNKvhLNtzJ1_IT-4yLPd3gxqAReovh&s=OXhEus3hHCArG_EcnzQ0EE41uvYoY8WseRiaEpzp5gY&e= . You are receiving this because you were mentioned.Message ID: <PaloAltoNetworks/terraform-google-swfw-modules/issues/34/2342961347@ github.com>

pavelrn commented 2 months ago

There was a change in the terraform-provider-google version 6.0 default values that now requires explicitly set balancing_mode. We need to adjust the module to be used with the newer provider version.