code: func PublishAllResourceOutputs(cfResourceName string,
  	cfResource gocf.ResourceProperties) sparta.ServiceDecoratorHookFunc {
  	return func(context map[string]interface{},
  		serviceName string,
  		cfTemplate *gocf.Template,
  		S3Bucket string,
  		S3Key string,
  		buildID string,
  		awsSession *session.Session,
  		noop bool,
  		logger *logrus.Logger) error {
  
  		// Add the Ref
  		cfTemplate.Outputs[sanitizedKeyName(fmt.Sprintf("%s_Ref", cfResourceName))] = &gocf.Output{
  			Description: fmt.Sprintf("%s (%s) Ref",
  				cfResourceName,
  				cfResource.CfnResourceType()),
  			Value: gocf.Ref(cfResourceName),
  		}
  		// Get the resource attributes
  		for _, eachAttr := range cfResource.CfnResourceAttributes() {
  			// Add the function ARN as a stack output
  			cfTemplate.Outputs[sanitizedKeyName(fmt.Sprintf("%s_Attr_%s", cfResourceName, eachAttr))] = &gocf.Output{
  				Description: fmt.Sprintf("%s (%s) Attribute: %s",
  					cfResourceName,
  					cfResource.CfnResourceType(),
  					eachAttr),
  				Value: gocf.GetAtt(cfResourceName, eachAttr),
  			}
  		}
  		return nil
  	}
  }
docs: // PublishAllResourceOutputs is a utility function to include all Ref and Att
  // outputs associated with the given (cfResourceName, cfResource) pair.