Skip to content

Commit

Permalink
provider/terraform: Handle output types
Browse files Browse the repository at this point in the history
  • Loading branch information
jen20 committed Jun 11, 2016
1 parent 219c53c commit 7066f10
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions builtin/providers/terraform/data_source_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ func dataSourceRemoteStateRead(d *schema.ResourceData, meta interface{}) error {

var outputs map[string]interface{}
if !state.State().Empty() {
outputValueMap := make(map[string]string)
outputValueMap := make(map[string]interface{})
for key, output := range state.State().RootModule().Outputs {
//This is ok for 0.6.17 as outputs will have been strings
outputValueMap[key] = output.Value.(string)
outputValueMap[key] = output.Value
}
}
d.Set("output", outputs)

d.SetId(time.Now().UTC().String())
d.Set("output", outputs)
return nil
}

0 comments on commit 7066f10

Please sign in to comment.