code: func (t *Template) AddResource(resource NamedResource) {
  	if _, ok := t.Resources[resource.Name]; ok {
  		panic(fmt.Sprintf("%s is already defined in the template", resource.Name))
  	}
  	t.Resources[resource.Name] = resource.Resource
  }
docs: // AddResource adds a named resource to the template.