code: func getSrc(data *schema.ResourceData) (string, bool, error) {
  	src := data.Get("source").(string)
  	if content, ok := data.GetOk("content"); ok {
  		file, err := ioutil.TempFile("", "tf-file-content")
  		if err != nil {
  			return "", true, err
  		}
  
  		if _, err = file.WriteString(content.(string)); err != nil {
  			return "", true, err
  		}
  
  		return file.Name(), true, nil
  	}
  
  	expansion, err := homedir.Expand(src)
  	return expansion, false, err
  }
docs: // getSrc returns the file to use as source