sparse-intern-71089
09/16/2018, 6:49 PMwhite-balloon-205
invoke
will call into the AWS Pulumi provider which builds on top of the Terraform AWS Provider, and will ultimately call https://www.terraform.io/docs/providers/aws/d/lb.html.
Unfortunately though, I believe Kubernetes + AWS don't offer any great solution to the core problem you are trying to solve. I might have expected Kubernetes to write the ARN of the load balancer back into the Service object, but it does not. And AWS does not offer a way to directly look up an LB ARN by DNS name. Moreover, I might also have expected Kubernetes to allow you to use an LB allocated outside of Kubernetes with a Service (and indeed, it seems perhaps this is an option for GCP, but not currently AWS?) so that you could create the LB with @pulumi/aws
and get its ARN, etc..
Pending Kubernetes getting better at this - the two answer I can think of are:
1. Use the JS AWS SDK or AWS CLI from Pulumi to do describe-load-balancers
to get ALL load balancers and then filter down manually to the one with the corresponding DNS name.
2. Pass the LB ARN in as config, and require a "two step" deployment where the Route53 resources are only created after that config is added, and do the aws elb describe-load-balancers
manually outside of Pulumi.wooden-toddler-96888
09/17/2018, 4:42 PM