bored-table-20691
02/04/2022, 11:32 PMConfigFile
in Go, where I have an older stack that works fine, but in a new stack, ConfigFile
loads no data - I’ve actually made an edit to the pulumi-kubernetes
SDK and the invocation to kubernetes:yaml:decode
is returning an empty list of objects. Same code, same version of Pulumi, etc - if I switch to the older stack, it works, and if I switch to the new one, it doesn’t.contourDeploy, 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).pulumi up -f
one time on it, it works fine after