Skip to content

Commit

Permalink
remove utils (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwholey authored Nov 1, 2021
1 parent 3eb3daa commit dec2c03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
5 changes: 3 additions & 2 deletions internal/provider/data_source_local_dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package provider

import (
"context"
"crypto/sha256"
"fmt"
"strconv"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down Expand Up @@ -63,7 +63,8 @@ func dataSourceDNSRecordsRead(ctx context.Context, d *schema.ResourceData, meta
return diag.FromErr(err)
}

d.SetId(strconv.FormatUint(uint64(hash(idRef)), 10))
hash := sha256.Sum256([]byte(idRef))
d.SetId(fmt.Sprintf("%x", hash[:]))

return diags
}
11 changes: 0 additions & 11 deletions internal/provider/utils.go

This file was deleted.

0 comments on commit dec2c03

Please sign in to comment.