Skip to content

Commit

Permalink
Replace usage of Read field with ReadContext in resource_password and…
Browse files Browse the repository at this point in the history
… resource_string (#230)
  • Loading branch information
bendbennett committed Apr 12, 2022
1 parent 9f8012a commit 2ea5683
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/provider/resource_password.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func resourcePassword() *schema.Resource {
"\n" +
"This resource *does* use a cryptographic random number generator.",
CreateContext: createStringFunc(true),
Read: readNil,
ReadContext: readNil,
Delete: schema.RemoveFromState,
Schema: stringSchemaV1(true),
Importer: &schema.ResourceImporter{
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/resource_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func resourceString() *schema.Resource {
"it in a password. For backwards compatibility it will continue to exist. For unique ids please " +
"use [random_id](id.html), for sensitive random values please use [random_password](password.html).",
CreateContext: createStringFunc(false),
Read: readNil,
ReadContext: readNil,
Delete: schema.RemoveFromState,
MigrateState: resourceRandomStringMigrateState,
SchemaVersion: 1,
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func generateRandomBytes(charSet *string, length int) ([]byte, error) {
return bytes, nil
}

func readNil(d *schema.ResourceData, meta interface{}) error {
func readNil(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
return nil
}

Expand Down

0 comments on commit 2ea5683

Please sign in to comment.