From 8d17fcea4ec02ff7b51722fed0dda182550a9e58 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 19 Dec 2018 15:20:23 -0500 Subject: [PATCH] make connection host Required And provide the connection config for validation --- terraform/eval_validate.go | 8 ++++---- terraform/node_resource_validate.go | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/terraform/eval_validate.go b/terraform/eval_validate.go index 06db8da0c..aaae21e8d 100644 --- a/terraform/eval_validate.go +++ b/terraform/eval_validate.go @@ -218,6 +218,10 @@ var connectionBlockSupersetSchema = &configschema.Block{ // by the config loader and stored away in a separate field. // Common attributes for both connection types + "host": { + Type: cty.String, + Required: true, + }, "type": { Type: cty.String, Optional: true, @@ -230,10 +234,6 @@ var connectionBlockSupersetSchema = &configschema.Block{ Type: cty.String, Optional: true, }, - "host": { - Type: cty.String, - Optional: true, - }, "port": { Type: cty.String, Optional: true, diff --git a/terraform/node_resource_validate.go b/terraform/node_resource_validate.go index 57bc6f1dd..c1e10a6b2 100644 --- a/terraform/node_resource_validate.go +++ b/terraform/node_resource_validate.go @@ -71,6 +71,7 @@ func (n *NodeValidatableResource) EvalTree() EvalNode { Schema: &provisionerSchema, Config: p, ResourceHasCount: hasCount, + ConnConfig: p.Connection, }, ) }