core: LoadSchemas must detect provisioners in non-root modules

This commit is contained in:
Martin Atkins 2018-06-01 12:50:44 -07:00
parent d961b1de1b
commit d3e4565681
1 changed files with 6 additions and 0 deletions

View File

@ -260,6 +260,12 @@ func loadProvisionerSchemas(schemas map[string]*configschema.Block, config *conf
ensure(pc.Type)
}
}
// Must also visit our child modules, recursively.
for _, cc := range config.Children {
childDiags := loadProvisionerSchemas(schemas, cc, components)
diags = diags.Append(childDiags)
}
}
return diags