fix(salt-masterless): Compare retrieved variable values with defaults
This commit is contained in:
parent
996f845d4b
commit
1242e08473
|
@ -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"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue