busy-island-31180
11/16/2023, 5:07 AMTransformations
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
/ 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).echoing-dinner-19531
11/19/2023, 11:11 PMbusy-island-31180
11/30/2023, 8:14 PMechoing-dinner-19531
11/30/2023, 9:28 PM