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: read after create #2718

Merged
merged 1 commit into from
Apr 22, 2024
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 pkg/resources/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ func CreateAccount(d *schema.ResourceData, meta interface{}) error {
}

d.SetId(helpers.EncodeSnowflakeID(account.AccountLocator))
return nil
return ReadAccount(d, meta)
}

// ReadAccount implements schema.ReadFunc.
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/account_password_policy_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func CreateAccountPasswordPolicyAttachment(d *schema.ResourceData, meta interfac

d.SetId(helpers.EncodeSnowflakeID(passwordPolicy))

return nil
return ReadAccountPasswordPolicyAttachment(d, meta)
}

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

d.SetId(name)
return nil
return ReadFailoverGroup(d, meta)
}

// ReadFailoverGroup implements schema.ReadFunc.
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/object_parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func CreateObjectParameter(d *schema.ResourceData, meta interface{}) error {
if err != nil {
return err
}
return nil
return ReadObjectParameter(d, meta)
}

// ReadObjectParameter implements schema.ReadFunc.
Expand Down
5 changes: 1 addition & 4 deletions pkg/resources/resource_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,7 @@ func CreateResourceMonitor(d *schema.ResourceData, meta interface{}) error {
}
}

if err := ReadResourceMonitor(d, meta); err != nil {
return err
}
return nil
return ReadResourceMonitor(d, meta)
}

// ReadResourceMonitor implements schema.ReadFunc.
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func UpdateAccountRole(ctx context.Context, d *schema.ResourceData, meta any) di
d.SetId(helpers.EncodeSnowflakeID(newId))
}

return nil
return ReadAccountRole(ctx, d, meta)
}

func DeleteAccountRole(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics {
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/table_column_masking_policy_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func CreateTableColumnMaskingPolicyApplication(d *schema.ResourceData, meta inte

d.SetId(TableColumnMaskingPolicyApplicationID(&input.TableColumnMaskingPolicyApplication))

return nil
return ReadTableColumnMaskingPolicyApplication(d, meta)
}

// ReadTableColumnMaskingPolicyApplication implements schema.ReadFunc.
Expand Down
Loading