helper/schema: CoreConfigSchema method for Backend

This is just like the method of the same name on Resource, adapting the
helper/schema model of schema into Terraform Core's idea of schema.
This commit is contained in:
Martin Atkins 2018-03-16 15:51:33 -07:00
parent 22d140e883
commit 1fb714ea3b
1 changed files with 6 additions and 0 deletions

View File

@ -154,3 +154,9 @@ func (s *Schema) coreConfigSchemaType() cty.Type {
func (r *Resource) CoreConfigSchema() *configschema.Block {
return schemaMap(r.Schema).CoreConfigSchema()
}
// CoreConfigSchema is a convenient shortcut for calling CoreConfigSchema
// on the backends's schema.
func (r *Backend) CoreConfigSchema() *configschema.Block {
return schemaMap(r.Schema).CoreConfigSchema()
}