I was just made aware of the `Transformations` fea...
# golang
b
I was just made aware of the
Transformations
feature of the ConfigGroup the kubernetes provider: https://www.pulumi.com/registry/packages/kubernetes/api-docs/yaml/configgroup/#yaml-with-transformations however, I see a problem that I don't think should work... and I feel like I'm missing something
Copy code
/ Set a resource alias for a previous name.
func(state map[string]interface{}, opts ...pulumi.ResourceOption) {
	if state["kind"] == "Deployment" {
		aliases := pulumi.Aliases([]pulumi.Alias{
			{
				Name: pulumi.String("oldName"),
			},
		})
		opts = append(opts, aliases)
	}
},
opts
isn't a pointer.. this append operation would remain local to the this transformation function (it would not be visible to the code that calls this transformation). maps are pointers though, so it makes sense that changes to a map will be seen from outside the transformation function (after the transformation runs).
e
Your correct, there's an issue about this at https://github.com/pulumi/pulumi-kubernetes/issues/2666
b
@echoing-dinner-19531 ya, that's the issue I created about this. 😛
e
🤦 I did not click through to see the name on the github user