// GetSchema implementation of terraform.ResourceProvider interface
GetSchema implementation of terraform.ResourceProvider interface
// GetSchema implementation of terraform . ResourceProvider interface
func (p *Provider) GetSchema(req *terraform.ProviderSchemaRequest) (*terraform.ProviderSchema, error) {
	resourceTypes := map[string]*configschema.Block{}
	dataSources := map[string]*configschema.Block{}
	for _, name := range req.ResourceTypes {
		if r, exists := p.ResourcesMap[name]; exists {
			resourceTypes[name] = r.CoreConfigSchema()
		}
	}
	for _, name := range req.DataSources {
		if r, exists := p.DataSourcesMap[name]; exists {
			dataSources[name] = r.CoreConfigSchema()
		}
	}
	return &terraform.ProviderSchema{
		Provider:      schemaMap(p.Schema).CoreConfigSchema(),
		ResourceTypes: resourceTypes,
		DataSources:   dataSources,
	}, nil
}
func ( p * Provider ) GetSchema ( req * terraform . ProviderSchemaRequest ) ( * terraform . ProviderSchema , error ) { resourceTypes := map [ string ] * configschema . Block { } dataSources := map [ string ] * configschema . Block { } for _ , name := range req . ResourceTypes { if r , exists := p . ResourcesMap [ name ] ; exists { resourceTypes [ name ] = r . CoreConfigSchema ( ) } } for _ , name := range req . DataSources { if r , exists := p . DataSourcesMap [ name ] ; exists { dataSources [ name ] = r . CoreConfigSchema ( ) } } return & terraform . ProviderSchema { Provider : schemaMap ( p . Schema ) . CoreConfigSchema ( ) , ResourceTypes : resourceTypes , DataSources : dataSources , } , nil }
GetSchema implementation of terraform.ResourceProvider interface
GetSchema implementation of terraform . ResourceProvider interface