Terraform-provider-kubernetes: Unable to fetch IP of 'LoadBalancer' service

Created on 28 Sep 2018  ·  4Comments  ·  Source: hashicorp/terraform-provider-kubernetes

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v0.11.8

Affected Resource(s)

kubernetes_service

Terraform Configuration Files

resource "kubernetes_service" "search_ssh_proxy" {
  metadata {
    name = "${var.search_ssh_proxy_name}"
  }
  spec {
    selector {
      app = "${var.search_ssh_proxy_name}"
    }
    port {
      port = 22
    }

    type = "LoadBalancer"
  }
}

Expected Behavior

External IP of loadbalancer should be returned

Actual Behavior

Error:

1 error(s) occurred:

* output.test: Resource 'kubernetes_service.search_ssh_proxy' does not have attribute 'load_balancer_ingress.ip' for variable 'kubernetes_service.search_ssh_proxy.load_balancer_ingress.ip'

Steps to Reproduce

Try to create kubernetes_service with type = LoabBalancer and fetch it's IP

Important Factoids

Running in Google cloud.
Workaround is to create IP resource first, fetch address, pass it to spec{ load_balancer_id = ${ss.ss.ss}}

stale

Most helpful comment

Actually reopening in order to update documetation...

All 4 comments

So this seems is more of a documentation issue as proper attribute is: load_balancer_ingress.0.ip and not as documentation says: load_balancer_ingress.ip

Below is a copy paste from state file...

"kubernetes_service.search_api": { "type": "kubernetes_service", "depends_on": [], "primary": { "id": "default/api", "attributes": { "id": "default/api", "load_balancer_ingress.#": "1", "load_balancer_ingress.0.hostname": "", "load_balancer_ingress.0.ip": "44.44.44.44"

Actually reopening in order to update documetation...

This issue has been open 180 days with no activity. If this issue is reproducible with the latest version of the provider and with Terraform 0.12, please comment. Otherwise this issue will be closed in 30 days.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings