From 8d0bec5728fd502b708e87f4735729be93086317 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Thu, 10 May 2018 17:18:17 -0700 Subject: [PATCH] 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. --- terraform/eval_validate.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/terraform/eval_validate.go b/terraform/eval_validate.go index bca62b72b9..d16b6430d0 100644 --- a/terraform/eval_validate.go +++ b/terraform/eval_validate.go @@ -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": {