This message was deleted.
# golang
s
This message was deleted.
b
I’m not sure it’s exactly the same, but here is one I’ve done with `yaml.NewConfigFile`:
Copy code
Transformations: []yaml.Transformation{
			// Use an NLB instead of an ELB
			func(state map[string]interface{}, opts ...pulumi.ResourceOption) {
				metadata := state["metadata"].(map[string]interface{})
				name := metadata["name"]
				if state["kind"] == "Service" && name == "envoy" {
					annotations := metadata["annotations"].(map[string]interface{})
					delete(annotations, "<http://service.beta.kubernetes.io/aws-load-balancer-backend-protocol|service.beta.kubernetes.io/aws-load-balancer-backend-protocol>")
					annotations["<http://service.beta.kubernetes.io/aws-load-balancer-type|service.beta.kubernetes.io/aws-load-balancer-type>"] = "nlb"
				}

				// We need to handle the fact we're using a wildcard cert,
				// and for certain browsers (Safari), this is an issue with
				// HTTP/2. As such, we only enable HTTP/1.
				// Read more here: <https://projectcontour.io/resources/faq/#q-when-i-load-my-site-in-safari-it-shows-me-an-empty-page-developer-tools-show-that-the-http-response-was-421-why-does-this-happen>
				if state["kind"] == "ConfigMap" && name == "contour" {
					data := state["data"].(map[string]interface{})
					contourConfig := data["contour.yaml"].(string)
					defaultHttpVersion := "default-http-versions:\n" + "- HTTP/1.1"
					contourConfig = contourConfig + "\n" + defaultHttpVersion
					data["contour.yaml"] = contourConfig
				}
			},
		},
g
This helps some. It's just difficult to determine the type Args is in golang
b
Yeah, the way I usually do it is I just print it out or get a compilation error by casting it to something nonsensical
and iterating
g
My struggles really begin because Args is just a pulumi.Output which I have to resolve in an Apply. Which I can't get to print out at all.
b
Ah yes, that makes it much more difficult.