From 1fb714ea3b06fed4ad77b42b2c50ab2ab616945c Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 16 Mar 2018 15:51:33 -0700 Subject: [PATCH] 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. --- helper/schema/core_schema.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helper/schema/core_schema.go b/helper/schema/core_schema.go index 95398578be..00e847a2c9 100644 --- a/helper/schema/core_schema.go +++ b/helper/schema/core_schema.go @@ -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() +}