make connection host Required
And provide the connection config for validation
This commit is contained in:
parent
bbaa8af4f7
commit
8d17fcea4e
|
@ -218,6 +218,10 @@ var connectionBlockSupersetSchema = &configschema.Block{
|
||||||
// by the config loader and stored away in a separate field.
|
// by the config loader and stored away in a separate field.
|
||||||
|
|
||||||
// Common attributes for both connection types
|
// Common attributes for both connection types
|
||||||
|
"host": {
|
||||||
|
Type: cty.String,
|
||||||
|
Required: true,
|
||||||
|
},
|
||||||
"type": {
|
"type": {
|
||||||
Type: cty.String,
|
Type: cty.String,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
@ -230,10 +234,6 @@ var connectionBlockSupersetSchema = &configschema.Block{
|
||||||
Type: cty.String,
|
Type: cty.String,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
},
|
},
|
||||||
"host": {
|
|
||||||
Type: cty.String,
|
|
||||||
Optional: true,
|
|
||||||
},
|
|
||||||
"port": {
|
"port": {
|
||||||
Type: cty.String,
|
Type: cty.String,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
|
|
@ -71,6 +71,7 @@ func (n *NodeValidatableResource) EvalTree() EvalNode {
|
||||||
Schema: &provisionerSchema,
|
Schema: &provisionerSchema,
|
||||||
Config: p,
|
Config: p,
|
||||||
ResourceHasCount: hasCount,
|
ResourceHasCount: hasCount,
|
||||||
|
ConnConfig: p.Connection,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue