(ctx context.Context)
| 95 | var _ providers.Interface = new(GRPCProvider) |
| 96 | |
| 97 | func (p *GRPCProvider) GetProviderSchema(ctx context.Context) (resp providers.GetProviderSchemaResponse) { |
| 98 | logger.Trace("GRPCProvider.v6: GetProviderSchema") |
| 99 | |
| 100 | schema := p.SchemaCache(func() providers.GetProviderSchemaResponse { |
| 101 | return p.getProviderSchema(ctx) |
| 102 | }) |
| 103 | |
| 104 | if !p.hasFetchedSchema && !schema.ServerCapabilities.GetProviderSchemaOptional { |
| 105 | // Force call, we only care that we are satisfying the legacy provider's schema call request |
| 106 | _, _ = p.getProtoProviderSchema(ctx) |
| 107 | } |
| 108 | |
| 109 | return schema |
| 110 | } |
| 111 | |
| 112 | func (p *GRPCProvider) getProviderSchema(ctx context.Context) (resp providers.GetProviderSchemaResponse) { |
| 113 | resp.ResourceTypes = make(map[string]providers.Schema) |
no test coverage detected