Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: misspelling #1262

Merged
merged 2 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/resources/table_constraint.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ resource "snowflake_table_constraint" "foreign_key" {
- `deferrable` (Boolean) Whether the constraint is deferrable
- `enable` (Boolean) Specifies whether the constraint is enabled or disabled. These properties are provided for compatibility with Oracle.
- `enforced` (Boolean) Whether the constraint is enforced
- `foreign_key_properties` (Block List, Max: 1) Addtional properties when type is set to foreign key. Not applicable for primary/unique keys (see [below for nested schema](#nestedblock--foreign_key_properties))
- `foreign_key_properties` (Block List, Max: 1) Additional properties when type is set to foreign key. Not applicable for primary/unique keys (see [below for nested schema](#nestedblock--foreign_key_properties))
- `initially` (String) Whether the constraint is initially deferred or immediate
- `rely` (Boolean) Specifies whether a constraint in NOVALIDATE mode is taken into account during query rewrite.
- `validate` (Boolean) Specifies whether to validate existing data on the table when a constraint is created. Only used in conjunction with the ENABLE property.
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func ConfigureProvider(s *schema.ResourceData) (interface{}, error) {
if oauthRefreshToken != "" {
accessToken, err := GetOauthAccessToken(oauthEndpoint, oauthClientID, oauthClientSecret, GetOauthData(oauthRefreshToken, oauthRedirectURL))
if err != nil {
return nil, errors.Wrap(err, "could not retreive access token from refresh token")
return nil, errors.Wrap(err, "could not retrieve access token from refresh token")
}
oauthAccessToken = accessToken
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func ReadFunction(d *schema.ResourceData, meta interface{}) error {
functionID.ArgTypes,
)

// some atributes can be retrieved only by Describe and some only by Show
// some attributes can be retrieved only by Describe and some only by Show
stmt, err := funct.Describe()
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions pkg/resources/integration_grant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ func TestIntegrationGrantCreate(t *testing.T) {
func TestIntegrationGrantRead(t *testing.T) {
r := require.New(t)

d := integrationGrant(t, "test-integration|||IMPORTED PRIVILIGES||false", map[string]interface{}{
d := integrationGrant(t, "test-integration|||IMPORTED PRIVILEGES||false", map[string]interface{}{
"integration_name": "test-integration",
"privilege": "IMPORTED PRIVILIGES",
"privilege": "IMPORTED PRIVILEGES",
"roles": []interface{}{"test-role-1", "test-role-2"},
"with_grant_option": false,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func Pipe() *schema.Resource {
}

func pipeCopyStatementDiffSuppress(k, old, new string, d *schema.ResourceData) bool {
// standardise line endings
// standardize line endings
old = strings.ReplaceAll(old, "\r\n", "\n")
new = strings.ReplaceAll(new, "\r\n", "\n")

Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/procedure.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func ReadProcedure(d *schema.ResourceData, meta interface{}) error {
procedureID.ArgTypes,
)

// some atributes can be retrieved only by Describe and some only by Show
// some attributes can be retrieved only by Describe and some only by Show
stmt, err := proc.Describe()
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/table_constraint.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ var tableConstraintSchema = map[string]*schema.Schema{
Optional: true,
ForceNew: true,
MaxItems: 1,
Description: "Addtional properties when type is set to foreign key. Not applicable for primary/unique keys",
Description: "Additional properties when type is set to foreign key. Not applicable for primary/unique keys",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"references": {
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/task_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func TestAcc_Task(t *testing.T) {
checkInt64("snowflake_task.root_task", "user_task_timeout_ms", stepOne.RootTask.UserTaskTimeoutMs),
resource.TestCheckResourceAttr("snowflake_task.root_task", "schedule", initialState.RootTask.Schedule),
resource.TestCheckResourceAttr("snowflake_task.child_task", "schedule", initialState.ChildTask.Schedule),
// Terraform SDK is not able to differenciate if the
// Terraform SDK is not able to differentiate if the
// attribute has deleted or set to zero value.
// ResourceData.GetChange returns the zero value of defined
// type in schema as new the value. Provider handles 0 for
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func normalizeQuery(str string) string {
// semantically significant.
//
// If we can find a sql parser that can handle the snowflake dialect then we should switch to parsing
// queries and either comparing ASTs or emiting a canonical serialization for comparison. I couldn't
// queries and either comparing ASTs or emitting a canonical serialization for comparison. I couldn't
// find such a library.
func DiffSuppressStatement(_, old, new string, d *schema.ResourceData) bool {
return strings.EqualFold(normalizeQuery(old), normalizeQuery(new))
Expand Down
2 changes: 1 addition & 1 deletion pkg/snowflake/resource_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func ListResourceMonitors(db *sql.DB) ([]resourceMonitor, error) {
dbs := []resourceMonitor{}
err = sqlx.StructScan(rows, &dbs)
if err == sql.ErrNoRows {
log.Println("[DEBUG] no resouce monitors found")
log.Println("[DEBUG] no resource monitors found")
return nil, nil
}
return dbs, errors.Wrapf(err, "unable to scan row for %s", stmt)
Expand Down
2 changes: 1 addition & 1 deletion pkg/snowflake/storage_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func ListStorageIntegrations(db *sql.DB) ([]storageIntegration, error) {
dbs := []storageIntegration{}
err = sqlx.StructScan(rows, &dbs)
if err == sql.ErrNoRows {
log.Println("[DEBUG] no resouce monitors found")
log.Println("[DEBUG] no resource monitors found")
return nil, nil
}
return dbs, errors.Wrapf(err, "unable to scan row for %s", stmt)
Expand Down
2 changes: 1 addition & 1 deletion pkg/snowflake/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ func (td *tableDescription) ColumnDefault() *ColumnDefault {

if td.ColumnIdentity() != nil {
/*
Identity/autoincrement information is stored in the same column as default information. We want to handle the identity seperate so will return nil
Identity/autoincrement information is stored in the same column as default information. We want to handle the identity separate so will return nil
here if identity information is present. Default/identity are mutually exclusive
*/
return nil
Expand Down