aws-observability / aws-otel-playground

Sample Application for the AWS X-Ray SDK with support for OpenTelemetry
MIT No Attribution
34 stars 15 forks source link

terraform apply error #7

Open Stevef-aa opened 3 years ago

Stevef-aa commented 3 years ago

kubernetes_service.fargate_backend: Creating... kubernetes_service.fargate_backend: Creation complete after 0s [id=fargate/backend] module.alb_ingress_controller.kubernetes_deployment.this: Still creating... [2m30s elapsed] module.alb_ingress_controller.kubernetes_deployment.this: Still creating... [2m40s elapsed] module.alb_ingress_controller.kubernetes_deployment.this: Still creating... [2m50s elapsed] module.alb_ingress_controller.kubernetes_deployment.this: Still creating... [3m0s elapsed] module.alb_ingress_controller.kubernetes_deployment.this: Still creating... [3m10s elapsed] module.alb_ingress_controller.kubernetes_deployment.this: Creation complete after 3m18s [id=kube-system/aws-alb-ingress-controller] kubernetes_ingress.fargate_ingress: Creating... kubernetes_ingress.fargate_ingress: Creation complete after 0s [id=fargate/backend]

Error: Invalid index

on eks.tf line 382, in output "eks_fargate_url": 382: value = kubernetes_ingress.fargate_ingress.load_balancer_ingress[0].hostname |---------------- | kubernetes_ingress.fargate_ingress.load_balancer_ingress is empty list of object

The given key does not identify an element in this collection value.

stevef1uk commented 3 years ago

This was a minor issue as I just set the value to a dummy fixed string and used the EKS console to find the URL required for the docker-compose.yml file

anuraaga commented 3 years ago

Hi @Stevef-aa - unfortunately we still have a race condition that we haven't been able to solve yet where terraform completes before the ingress has finished initializing completely. A second run of terraform picks it up though and I think would have shown you the URL. We'll try to come up with a better fix though.