sparse-intern-71089
02/04/2022, 11:32 PMbored-table-20691
02/04/2022, 11:34 PMcontourDeploy, err := yaml.NewConfigFile(ctx, "contour-deploy-file", &yaml.ConfigFileArgs{
File: "./contour.yaml",
Transformations: []yaml.Transformation{
// Use an NLB instead of an ELB
func(state map[string]interface{}, opts ...pulumi.ResourceOption) {
...
},
},
}, pulumi.Provider(eksConfig.Provider))
if err != nil {
return nil, err
}
fmt.Println(contourDeploy.Resources)
contourService := contourDeploy.GetResource("v1/Service", "envoy", "projectcontour").(*corev1.Service)
contourServiceLB := contourService.Status.LoadBalancer().Ingress().Index(<http://pulumi.Int|pulumi.Int>(0)).Hostname().Elem()
I’ve elided the transformation as it never gets called. I added the Println to debug, and the original issue is that it tells me that it can’t do the cast since that value is nil
(since it doesn’t exist).bored-table-20691
02/05/2022, 12:14 AMpulumi up -f
one time on it, it works fine after