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

add protocol to backend

Open anovis opened this issue 3 years ago • 3 comments

protocol not getting passed for serverless NEG since only HTTP is supported. However, for internet NEG, this can be configured to be HTTPS or HTTP. I would like to be able to set it, since everything else works in this module for internet NEG. Currently I use this module and then manually have the change in the ui the internet NEG protocol from http to https.
closes #201

https://cloud.google.com/load-balancing/docs/negs#internet-neg https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_backend_service

anovis avatar Jul 28 '22 17:07 anovis

Thanks for the PR! 🚀 Unfortunately it looks like some of our CI checks failed. See the Contributing Guide for details.

  • ⚠️check_whitespace Failed whitespace check. More details below.
Checking for trailing whitespace
./variables.tf:84:  
./modules/serverless_negs/variables.tf:61:  
./modules/serverless_negs/main.tf:184:  
./modules/dynamic_backends/variables.tf:84:  
Error: Trailing whitespace found in the lines above.
Checking for missing newline at end of file
  • ⚠️check_terraform Failed Terraform check. More details below.
Running terraform fmt
variables.tf
--- old/variables.tf
+++ new/variables.tf
@@ -81,7 +81,7 @@
variable "backends" {
  description = "Map backend indices to list of backend maps."
  type = map(object({
-  
+
    protocol  = string
    port      = number
    port_name = string
Error: terraform fmt failed with exit code 3
Check the output for diffs and correct using terraform fmt <dir>
modules/serverless_negs/variables.tf
--- old/modules/serverless_negs/variables.tf
+++ new/modules/serverless_negs/variables.tf
@@ -58,8 +58,8 @@
variable "backends" {
  description = "Map backend indices to list of backend maps."
  type = map(object({
-  
-    protocol  = string
+
+    protocol = string

    description             = string
    enable_cdn              = bool
Error: terraform fmt failed with exit code 3
Check the output for diffs and correct using terraform fmt <dir>
modules/serverless_negs/main.tf
--- old/modules/serverless_negs/main.tf
+++ new/modules/serverless_negs/main.tf
@@ -180,8 +180,8 @@

  load_balancing_scheme = var.load_balancing_scheme

-  protocol                        = lookup(each.value, "protocol", "HTTP")
-  
+  protocol = lookup(each.value, "protocol", "HTTP")
+
  description                     = lookup(each.value, "description", null)
  connection_draining_timeout_sec = lookup(each.value, "connection_draining_timeout_sec", null)
  enable_cdn                      = lookup(each.value, "enable_cdn", false)
Error: terraform fmt failed with exit code 3
Check the output for diffs and correct using terraform fmt <dir>
modules/dynamic_backends/variables.tf
--- old/modules/dynamic_backends/variables.tf
+++ new/modules/dynamic_backends/variables.tf
@@ -81,7 +81,7 @@
variable "backends" {
  description = "Map backend indices to list of backend maps."
  type = map(object({
-  
+
    protocol  = string
    port      = number
    port_name = string
Error: terraform fmt failed with exit code 3
Check the output for diffs and correct using terraform fmt <dir>

comment-bot-dev avatar Jul 28 '22 17:07 comment-bot-dev

This PR 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 Sep 30 '22 23:09 github-actions[bot]

@bharathkkb i may need help getting it to format. i fix one by running terraform fmt, but then it fails saying to do terraform make build, which then causes the format to fail. any advice?

anovis avatar Oct 07 '22 16:10 anovis

@anovis I think moving it to separate line may do the trick

bharathkkb avatar Nov 03 '22 18:11 bharathkkb

:(. lol

anovis avatar Nov 03 '22 19:11 anovis

closing for #285.

anovis avatar Nov 09 '22 15:11 anovis