Skip to content

Commit

Permalink
fix views (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
alldoami committed Nov 4, 2019
1 parent c854160 commit db1fc95
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions providers/snowflake/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ type ViewGenerator struct {
func (g ViewGenerator) createResources(viewList []view) []terraform_utils.Resource {
var resources []terraform_utils.Resource
for _, view := range viewList {
resources = append(resources, terraform_utils.NewSimpleResource(
resources = append(resources, terraform_utils.NewResource(
fmt.Sprintf("%s|%s|%s", view.DatabaseName.String, view.SchemaName.String, view.Name.String),
fmt.Sprintf("%s__%s__%s", view.DatabaseName.String, view.SchemaName.String, view.Name.String),
"snowflake_view",
"snowflake",
[]string{}))
map[string]string{},
[]string{},
map[string]interface{}{
"database": view.DatabaseName.String,
"statement": view.Text.String,
},
))
}
return resources
}
Expand Down

0 comments on commit db1fc95

Please sign in to comment.