```func (c *Chart) GetResource(gvk, name, namespac...
# golang
b
Copy code
func (c *Chart) GetResource(gvk, name, namespace string) pulumi.AnyOutput {
	id := name
	if len(namespace) > 0 && namespace != "default" {
		id = fmt.Sprintf("%s/%s", namespace, name)
	}
	key := fmt.Sprintf("%s::%s", gvk, id)
	return c.Resources.ApplyT(func(x interface{}) interface{} {
		resources := x.(map[string]pulumi.Resource)
		return resources[key]
	}).(pulumi.AnyOutput)
}