code: func (r *ResourceAddress) stateId() string {
  	result := fmt.Sprintf("%s.%s", r.Type, r.Name)
  	switch r.Mode {
  	case config.ManagedResourceMode:
  		// Done
  	case config.DataResourceMode:
  		result = fmt.Sprintf("data.%s", result)
  	default:
  		panic(fmt.Errorf("unknown resource mode: %s", r.Mode))
  	}
  	if r.Index >= 0 {
  		result += fmt.Sprintf(".%d", r.Index)
  	}
  
  	return result
  }
docs: // stateId returns the ID that this resource should be entered with
  // in the state. This is also used for diffs. In the future, we'd like to
  // move away from this string field so I don't export this.