diff --git a/CHANGELOG.md b/CHANGELOG.md index e52a4ca5..2b64ef76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/internal/provider/provider.go b/internal/provider/provider.go index ddd2ee9f..a20e43e6 100644 --- a/internal/provider/provider.go +++ b/internal/provider/provider.go @@ -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" @@ -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)