Skip to content

Commit

Permalink
fake imposible read.
Browse files Browse the repository at this point in the history
  • Loading branch information
BarnabyShearer committed Nov 22, 2021
1 parent 80d9ad7 commit 083246f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dockerhub/resource_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func resourceToken() *schema.Resource {
return &schema.Resource{
Description: "A hub.docker.io personal access token (for uploading images).",
CreateContext: resourceTokenCreate,
ReadContext: noop,
DeleteContext: resourceTokenDelete,
Schema: map[string]*schema.Schema{
"id": {
Expand Down Expand Up @@ -56,6 +57,10 @@ func resourceTokenCreate(ctx context.Context, d *schema.ResourceData, m interfac
return nil
}

func noop(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
return nil
}

func resourceTokenDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
client := m.(*dh.Client)
err := client.DeletePersonalAccessToken(ctx, d.Id())
Expand Down

0 comments on commit 083246f

Please sign in to comment.