code: func (s *BackendState) ForPlan(schema *configschema.Block, workspaceName string) (*plans.Backend, error) {
  	if s == nil {
  		return nil, nil
  	}
  
  	configVal, err := s.Config(schema)
  	if err != nil {
  		return nil, errwrap.Wrapf("failed to decode backend config: {{err}}", err)
  	}
  	return plans.NewBackend(s.Type, configVal, schema, workspaceName)
  }
docs: // ForPlan produces an alternative representation of the reciever that is
  // suitable for storing in a plan. The current workspace must additionally
  // be provided, to be stored alongside the backend configuration.
  //
  // The backend configuration schema is required in order to properly
  // encode the backend-specific configuration settings.