// Resources implementation of terraform.ResourceProvider interface.
Resources implementation of terraform.ResourceProvider interface.
// Resources implementation of terraform . ResourceProvider interface .
func (p *Provider) Resources() []terraform.ResourceType {
	keys := make([]string, 0, len(p.ResourcesMap))
	for k := range p.ResourcesMap {
		keys = append(keys, k)
	}
	sort.Strings(keys)
	result := make([]terraform.ResourceType, 0, len(keys))
	for _, k := range keys {
		resource := p.ResourcesMap[k]
		if resource == nil {
			resource = &Resource{}
		}
		result = append(result, terraform.ResourceType{
			Name:       k,
			Importable: resource.Importer != nil,
			SchemaAvailable: true,
		})
	}
	return result
}
func ( p * Provider ) Resources ( ) [ ] terraform . ResourceType { keys := make ( [ ] string , 0 , len ( p . ResourcesMap ) ) for k := range p . ResourcesMap { keys = append ( keys , k ) } sort . Strings ( keys ) result := make ( [ ] terraform . ResourceType , 0 , len ( keys ) ) for _ , k := range keys { resource := p . ResourcesMap [ k ] if resource == nil { resource = & Resource { } } result = append ( result , terraform . ResourceType { Name : k , Importable : resource . Importer != nil , SchemaAvailable : true , } ) } return result }
Resources implementation of terraform.ResourceProvider interface.
Resources implementation of terraform . ResourceProvider interface .
// This isn't really possible (it'd fail InternalValidate), but // we do it anyways to avoid a panic. // Indicates that a provider is compiled against a new enough // version of core to support the GetSchema method.