terraform: fix some failing tess

This commit is contained in:
Mitchell Hashimoto 2015-02-11 18:30:01 -08:00
parent baf26e9c92
commit d9118007ea
2 changed files with 5 additions and 2 deletions

View File

@ -515,7 +515,9 @@ func (c *walkContext) Walk() error {
vraw = list[0]
}
if s, ok := vraw.(string); ok {
outputs[o.Name] = s
if s != config.UnknownVariableValue {
outputs[o.Name] = s
}
} else {
return fmt.Errorf("Type of output '%s' is not a string: %#v", o.Name, vraw)
}
@ -1188,6 +1190,7 @@ func (c *walkContext) genericWalkFn(cb genericWalkFunc) depgraph.WalkFunc {
if err := rc.interpolate(c, nil); err != nil {
return err
}
println(fmt.Sprintf("%#v", rc))
for k, v := range rc.Config {
wc.Variables[k] = v.(string)
}

View File

@ -191,7 +191,7 @@ func (i *Interpolater) valueResourceVar(
result map[string]ast.Variable) error {
// If we're computing all dynamic fields, then module vars count
// and we mark it as computed.
if i.Operation == walkValidate {
if i.Operation == walkValidate || i.Operation == walkRefresh {
result[n] = ast.Variable{
Value: config.UnknownVariableValue,
Type: ast.TypeString,