core: Don't include "type" in connection block schema

The config loader already extracts this during its initial pass and saves
it as a separate field in a configs.Connection value, so requiring it
again here causes confusing errors about this attribute being provided but
not set.
This commit is contained in:
Martin Atkins 2018-05-10 17:18:17 -07:00
parent f148b26287
commit 8d0bec5728
1 changed files with 2 additions and 4 deletions

View File

@ -208,10 +208,8 @@ func (n *EvalValidateProvisioner) validateConnConfig(ctx EvalContext, config *co
// exactly what is expected for a given connection type.
var connectionBlockSupersetSchema = &configschema.Block{
Attributes: map[string]*configschema.Attribute{
"type": {
Type: cty.String,
Required: true,
},
// NOTE: "type" is not included here because it's treated special
// by the config loader and stored away in a separate field.
// Common attributes for both connection types
"user": {