Skip to content

Commit

Permalink
Docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
mwiewior committed Jun 14, 2022
1 parent 1967c5b commit 2e54499
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/data-sources/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Read-Only:
- `comment` (String)
- `default_namespace` (String)
- `default_role` (String)
- `default_secondary_roles` (Set of String)
- `default_warehouse` (String)
- `disabled` (Boolean)
- `display_name` (String)
Expand Down
1 change: 1 addition & 0 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource snowflake_user user {
last_name = "User"
default_warehouse = "warehouse"
default_secondary_roles = ['ALL']
default_role = "role1"
rsa_public_key = "..."
Expand Down
1 change: 1 addition & 0 deletions examples/resources/snowflake_user/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ resource snowflake_user user {
last_name = "User"

default_warehouse = "warehouse"
default_secondary_roles = ['ALL']
default_role = "role1"

rsa_public_key = "..."
Expand Down
6 changes: 3 additions & 3 deletions pkg/datasources/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ var usersSchema = map[string]*schema.Schema{
Computed: true,
},
"default_secondary_roles": {
Type: schema.TypeSet,
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Type: schema.TypeSet,
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Computed: true,
},
"has_rsa_public_key": {
Expand Down
12 changes: 6 additions & 6 deletions pkg/resources/procedure.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ var procedureSchema = map[string]*schema.Schema{
DiffSuppressFunc: DiffSuppressStatement,
},
"language": {
Type: schema.TypeString,
Optional: true,
Default: "SQL",
Type: schema.TypeString,
Optional: true,
Default: "SQL",
// Suppress the diff shown if the values are equal when both compared in lower case.
DiffSuppressFunc: DiffTypes,
ValidateFunc: validation.StringInSlice(procedureLanguages, true),
Description: "Specifies the language of the stored procedure code.",
ValidateFunc: validation.StringInSlice(procedureLanguages, true),
Description: "Specifies the language of the stored procedure code.",
},
"execute_as": {
Type: schema.TypeString,
Expand Down Expand Up @@ -278,7 +278,7 @@ func ReadProcedure(d *schema.ResourceData, meta interface{}) error {
if err = d.Set("language", desc.Value.String); err != nil {
return err
}

default:
log.Printf("[WARN] unexpected procedure property %v returned from Snowflake", desc.Property.String)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/snowflake/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"database/sql"
"encoding/json"
"fmt"
"github.com/pkg/errors"
"log"
"strings"

"github.com/pkg/errors"

"github.com/jmoiron/sqlx"
)

Expand Down

0 comments on commit 2e54499

Please sign in to comment.