make connection host Required

And provide the connection config for validation
This commit is contained in:
James Bardin 2018-12-19 15:20:23 -05:00
parent bbaa8af4f7
commit 8d17fcea4e
2 changed files with 5 additions and 4 deletions

View File

@ -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,

View File

@ -71,6 +71,7 @@ func (n *NodeValidatableResource) EvalTree() EvalNode {
Schema: &provisionerSchema,
Config: p,
ResourceHasCount: hasCount,
ConnConfig: p.Connection,
},
)
}