code: func Marshal(c *configs.Config, schemas *terraform.Schemas) ([]byte, error) {
  	var output config
  
  	pcs := make(map[string]providerConfig)
  	marshalProviderConfigs(c, schemas, pcs)
  	output.ProviderConfigs = pcs
  
  	rootModule, err := marshalModule(c, schemas, "")
  	if err != nil {
  		return nil, err
  	}
  	output.RootModule = rootModule
  
  	ret, err := json.Marshal(output)
  	return ret, err
  }
docs: // Marshal returns the json encoding of terraform configuration.