fix(salt-masterless): Compare retrieved variable values with defaults

This commit is contained in:
Jurnell Cockhren 2018-01-21 00:35:04 -06:00 committed by Martin Atkins
parent 996f845d4b
commit 1242e08473
1 changed files with 3 additions and 3 deletions

View File

@ -424,7 +424,7 @@ func validateFn(c *terraform.ResourceConfig) (ws []string, es []error) {
var remoteStateTree string
remoteStateTreeTmp, ok := c.Get("remote_state_tree")
if !ok {
remoteStateTree = ""
remoteStateTree = DefaultStateTreeDir
} else {
remoteStateTree = remoteStateTreeTmp.(string)
}
@ -432,12 +432,12 @@ func validateFn(c *terraform.ResourceConfig) (ws []string, es []error) {
var remotePillarRoots string
remotePillarRootsTmp, ok := c.Get("remote_pillar_roots")
if !ok {
remotePillarRoots = ""
remotePillarRoots = DefaultPillarRootDir
} else {
remotePillarRoots = remotePillarRootsTmp.(string)
}
if minionConfig != "" && (remoteStateTree != "" || remotePillarRoots != "") {
if minionConfig != "" && (remoteStateTree != DefaultStateTreeDir || remotePillarRoots != DefaultPillarRootDir) {
es = append(es,
errors.New("remote_state_tree and remote_pillar_roots only apply when minion_config_file is not used"))
}