Skip to content

Commit

Permalink
Replace usage of State field with StateContext in resource_integer
Browse files Browse the repository at this point in the history
  • Loading branch information
bendbennett committed Apr 12, 2022
1 parent 2fce511 commit 79d154b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/provider/resource_integer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func resourceInteger() *schema.Resource {
ReadContext: schema.NoopContext,
DeleteContext: DeleteInteger,
Importer: &schema.ResourceImporter{
State: ImportInteger,
StateContext: ImportInteger,
},

Schema: map[string]*schema.Schema{
Expand Down Expand Up @@ -98,7 +98,7 @@ func DeleteInteger(_ context.Context, d *schema.ResourceData, _ interface{}) dia
return nil
}

func ImportInteger(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
func ImportInteger(_ context.Context, d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
parts := strings.Split(d.Id(), ",")
if len(parts) != 3 && len(parts) != 4 {
return nil, fmt.Errorf("Invalid import usage: expecting {result},{min},{max} or {result},{min},{max},{seed}")
Expand Down

0 comments on commit 79d154b

Please sign in to comment.