code: func (r *Reader) ReadConfig() (*configs.Config, tfdiags.Diagnostics) {
  	var diags tfdiags.Diagnostics
  
  	snap, err := r.ReadConfigSnapshot()
  	if err != nil {
  		diags = diags.Append(tfdiags.Sourceless(
  			tfdiags.Error,
  			"Failed to read configuration from plan file",
  			fmt.Sprintf("The configuration file snapshot in the plan file could not be read: %s.", err),
  		))
  		return nil, diags
  	}
  
  	loader := configload.NewLoaderFromSnapshot(snap)
  	rootDir := snap.Modules[""].Dir // Root module base directory
  	config, configDiags := loader.LoadConfig(rootDir)
  	diags = diags.Append(configDiags)
  
  	return config, diags
  }
docs: // ReadConfig reads the configuration embedded in the plan file.
  //
  // Internally this function delegates to the configs/configload package to
  // parse the embedded configuration and so it returns diagnostics (rather than
  // a native Go error as with other methods on Reader).