code: func (t *Template) AddResource(name string, resource ResourceProperties) *Resource {
  	templateResource := &Resource{Properties: resource}
  	t.Resources[name] = templateResource
  	return templateResource
  }
docs: // AddResource adds the resource to the template as name, displacing
  // any resource with the same name that already exists.