Skip to content

Commit

Permalink
Merge pull request #160 from hashicorp/setRandIntSeed
Browse files Browse the repository at this point in the history
Set rand seed when initializing provider
  • Loading branch information
SBGoods authored Nov 17, 2022
2 parents c799be0 + 199edfc commit 056cf6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 3.2.1 (November 17, 2022)

BUG FIXES:

* provider: Fix random number generation for `id` attributes ([#160](https://github.com/hashicorp/terraform-provider-null/pull/160))

## 3.2.0 (October 25, 2022)

NOTES:
Expand Down
6 changes: 6 additions & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package provider

import (
"context"
"math/rand"
"time"

"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/diag"
Expand All @@ -10,6 +12,10 @@ import (
"github.com/hashicorp/terraform-plugin-framework/tfsdk"
)

func init() {
rand.Seed(time.Now().Unix())
}

var (
_ provider.Provider = (*nullProvider)(nil)
_ provider.ProviderWithMetadata = (*nullProvider)(nil)
Expand Down

0 comments on commit 056cf6f

Please sign in to comment.