https://pulumi.com logo
#golang
Title
# golang
b

busy-island-31180

11/16/2023, 5:07 AM
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

echoing-dinner-19531

11/19/2023, 11:11 PM
Your correct, there's an issue about this at https://github.com/pulumi/pulumi-kubernetes/issues/2666
b

busy-island-31180

11/30/2023, 8:14 PM
@echoing-dinner-19531 ya, that's the issue I created about this. 😛
e

echoing-dinner-19531

11/30/2023, 9:28 PM
🤦 I did not click through to see the name on the github user