Skip to content

Commit

Permalink
fix(salt-masterless): Compare retrieved variable values with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurnell Cockhren authored and apparentlymart committed Feb 15, 2019
1 parent 996f845 commit 1242e08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builtin/provisioners/salt-masterless/resource_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,20 +424,20 @@ 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)
}

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"))
}
Expand Down

0 comments on commit 1242e08

Please sign in to comment.