Kubernetes_service does not have attribute "status"

Error in rundeck

Error: Unsupported attribute
19:38:36 │
19:38:36 │ on .terraform/modules/apiary-federation/ouputs.tf line 2, in output “waggle_dance_load_balancers”:
19:38:36 │ 2: value = var.wd_instance_type == “k8s” ? kubernetes_service.waggle_dance[0].status.0.load_balancer.0.ingress.*.hostname : (var.wd_instance_type == “ecs” && var.enable_autoscaling ? [aws_lb.waggledance[0].dns_name] : )
19:38:36 │
19:38:36 │ This object has no argument, nested block, or exported attribute named
19:38:36 │ “status”.

CODE BASE >>
output “waggle_dance_load_balancers” {
value = var.wd_instance_type == “k8s” ? kubernetes_service.waggle_dance[0].status.0.load_balancer.0.ingress.*.hostname : (var.wd_instance_type == “ecs” && var.enable_autoscaling ? [aws_lb.waggledance[0].dns_name] : )
}

I do not see status variable anywhere in my code . Where does this coming from. I am ne w to this terraform & the code is alredy existing.

Hi @tgondimalla_expedia,

The expression from the error message includes this reference:

kubernetes_service.waggle_dance[0].status

I’m not very familiar with this resource type so I don’t have any specific suggestions to add, but this error message seems to say that the kubernetes_service resource type does not have an attribute named status.

The provider documentation for this resource type does say that it supports this attribute, so I’m not sure why this is happening. Are you maybe running an older version of the provider that didn’t have this attribute yet?

I’m going to move this question to the Kubernetes Provider category since then it’s more likely that someone with more experience with this provider will find it, and can hopefully be more helpful than I can.