diff --git a/go.mod b/go.mod index c53e1a8..07f0d14 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ toolchain go1.21.6 require ( github.com/hashicorp/go-memdb v1.3.4 + github.com/hashicorp/go-version v1.7.0 github.com/hashicorp/terraform-json v0.22.1 github.com/hashicorp/terraform-plugin-framework v1.10.0 github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1 @@ -34,7 +35,6 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hc-install v0.7.0 // indirect github.com/hashicorp/hcl/v2 v2.21.0 // indirect diff --git a/internal/framework5provider/float32_precision_resource_test.go b/internal/framework5provider/float32_precision_resource_test.go index 7e2195a..4dd65d3 100644 --- a/internal/framework5provider/float32_precision_resource_test.go +++ b/internal/framework5provider/float32_precision_resource_test.go @@ -7,7 +7,6 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-version" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov5" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -84,9 +83,9 @@ func TestSchemaResource_Float32Attribute_Precision_MaxFloat32(t *testing.T) { resource.UnitTest(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ // go-cty v1.14.4 uses string msgpack encoding instead of float msgpack encoding for large whole numbers - // https://github.com/hashicorp/terraform/commit/cd252557e4200e031b942d9ff35c455bb30d858f + // https://github.com/hashicorp/terraform/pull/34756 // This changes allows the math.MaxFloat32 value to succeed in planning but fail during apply. - // Terraform v1.9.0-alpha20240501 is the first Terraform version to use this updated encoding. + // Terraform v1.9.0 is the first Terraform version to use this updated encoding. tfversion.All( tfversion.SkipBelow(tfversion.Version0_15_0), tfversion.SkipAbove(tfversion.Version1_8_0), @@ -163,13 +162,13 @@ func TestSchemaResource_Float32Attribute_Precision_MaxFloat32(t *testing.T) { // https://github.com/hashicorp/terraform-plugin-framework/issues/1017 // // go-cty v1.14.4 uses string msgpack encoding instead of float msgpack encoding for large whole numbers -// https://github.com/hashicorp/terraform/commit/cd252557e4200e031b942d9ff35c455bb30d858f +// https://github.com/hashicorp/terraform/pull/34756 // This changes allows the math.MaxFloat32 value to succeed in planning but fail during apply. -// Terraform v1.9.0-alpha20240501 is the first Terraform version to use this updated encoding. +// Terraform v1.9.0 is the first Terraform version to use this updated encoding. func TestSchemaResource_Float32Attribute_Precision_MaxFloat32_TF1_9(t *testing.T) { resource.UnitTest(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ - tfversion.SkipBelow(version.Must(version.NewVersion("1.9.0-alpha20240501"))), + tfversion.SkipBelow(tfversion.Version1_9_0), }, ProtoV5ProviderFactories: map[string]func() (tfprotov5.ProviderServer, error){ "framework": providerserver.NewProtocol5WithError(New()), diff --git a/internal/framework5provider/float64_precision_resource_test.go b/internal/framework5provider/float64_precision_resource_test.go index dcd0a43..fe7b41e 100644 --- a/internal/framework5provider/float64_precision_resource_test.go +++ b/internal/framework5provider/float64_precision_resource_test.go @@ -7,7 +7,6 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-version" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov5" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -84,9 +83,9 @@ func TestSchemaResource_Float64Attribute_Precision_MaxFloat32(t *testing.T) { resource.UnitTest(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ // go-cty v1.14.4 uses string msgpack encoding instead of float msgpack encoding for large whole numbers - // https://github.com/hashicorp/terraform/commit/cd252557e4200e031b942d9ff35c455bb30d858f + // https://github.com/hashicorp/terraform/pull/34756 // This changes allows the math.MaxFloat32 value to succeed in planning but fail during apply. - // Terraform v1.9.0-alpha20240501 is the first Terraform version to use this updated encoding. + // Terraform v1.9.0 is the first Terraform version to use this updated encoding. tfversion.All( tfversion.SkipBelow(tfversion.Version0_15_0), tfversion.SkipAbove(tfversion.Version1_8_0), @@ -163,13 +162,13 @@ func TestSchemaResource_Float64Attribute_Precision_MaxFloat32(t *testing.T) { // https://github.com/hashicorp/terraform-plugin-framework/issues/1017 // // go-cty v1.14.4 uses string msgpack encoding instead of float msgpack encoding for large whole numbers -// https://github.com/hashicorp/terraform/commit/cd252557e4200e031b942d9ff35c455bb30d858f +// https://github.com/hashicorp/terraform/pull/34756 // This changes allows the math.MaxFloat32 value to succeed in planning but fail during apply. -// Terraform v1.9.0-alpha20240501 is the first Terraform version to use this updated encoding. +// Terraform v1.9.0 is the first Terraform version to use this updated encoding. func TestSchemaResource_Float64Attribute_Precision_MaxFloat32_TF1_9(t *testing.T) { resource.UnitTest(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ - tfversion.SkipBelow(version.Must(version.NewVersion("1.9.0-alpha20240501"))), + tfversion.SkipBelow(tfversion.Version1_9_0), }, ProtoV5ProviderFactories: map[string]func() (tfprotov5.ProviderServer, error){ "framework": providerserver.NewProtocol5WithError(New()), diff --git a/internal/framework6provider/float32_precision_resource_test.go b/internal/framework6provider/float32_precision_resource_test.go index 84b4f73..1b62ba3 100644 --- a/internal/framework6provider/float32_precision_resource_test.go +++ b/internal/framework6provider/float32_precision_resource_test.go @@ -7,7 +7,6 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-version" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -84,9 +83,9 @@ func TestSchemaResource_Float32Attribute_Precision_MaxFloat32(t *testing.T) { resource.UnitTest(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ // go-cty v1.14.4 uses string msgpack encoding instead of float msgpack encoding for large whole numbers - // https://github.com/hashicorp/terraform/commit/cd252557e4200e031b942d9ff35c455bb30d858f + // https://github.com/hashicorp/terraform/pull/34756 // This changes allows the math.MaxFloat32 value to succeed in planning but fail during apply. - // Terraform v1.9.0-alpha20240501 is the first Terraform version to use this updated encoding. + // Terraform v1.9.0 is the first Terraform version to use this updated encoding. tfversion.All( tfversion.SkipBelow(tfversion.Version0_15_0), tfversion.SkipAbove(tfversion.Version1_8_0), @@ -163,13 +162,13 @@ func TestSchemaResource_Float32Attribute_Precision_MaxFloat32(t *testing.T) { // https://github.com/hashicorp/terraform-plugin-framework/issues/1017 // // go-cty v1.14.4 uses string msgpack encoding instead of float msgpack encoding for large whole numbers -// https://github.com/hashicorp/terraform/commit/cd252557e4200e031b942d9ff35c455bb30d858f +// https://github.com/hashicorp/terraform/pull/34756 // This changes allows the math.MaxFloat32 value to succeed in planning but fail during apply. -// Terraform v1.9.0-alpha20240501 is the first Terraform version to use this updated encoding. +// Terraform v1.9.0 is the first Terraform version to use this updated encoding. func TestSchemaResource_Float32Attribute_Precision_MaxFloat32_TF1_9(t *testing.T) { resource.UnitTest(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ - tfversion.SkipBelow(version.Must(version.NewVersion("1.9.0-alpha20240501"))), + tfversion.SkipBelow(tfversion.Version1_9_0), }, ProtoV6ProviderFactories: map[string]func() (tfprotov6.ProviderServer, error){ "framework": providerserver.NewProtocol6WithError(New()), diff --git a/internal/framework6provider/float64_precision_resource_test.go b/internal/framework6provider/float64_precision_resource_test.go index c68e113..ac549b7 100644 --- a/internal/framework6provider/float64_precision_resource_test.go +++ b/internal/framework6provider/float64_precision_resource_test.go @@ -7,7 +7,6 @@ import ( "regexp" "testing" - "github.com/hashicorp/go-version" "github.com/hashicorp/terraform-plugin-framework/providerserver" "github.com/hashicorp/terraform-plugin-go/tfprotov6" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -86,7 +85,7 @@ func TestSchemaResource_Float64Attribute_Precision_MaxFloat32(t *testing.T) { // go-cty v1.14.4 uses string msgpack encoding instead of float msgpack encoding for large whole numbers // https://github.com/hashicorp/terraform/commit/cd252557e4200e031b942d9ff35c455bb30d858f // This changes allows the math.MaxFloat32 value to succeed in planning but fail during apply. - // Terraform v1.9.0-alpha20240501 is the first Terraform version to use this updated encoding. + // Terraform v1.9.0 is the first Terraform version to use this updated encoding. tfversion.All( tfversion.SkipBelow(tfversion.Version0_15_0), tfversion.SkipAbove(tfversion.Version1_8_0), @@ -165,11 +164,11 @@ func TestSchemaResource_Float64Attribute_Precision_MaxFloat32(t *testing.T) { // go-cty v1.14.4 uses string msgpack encoding instead of float msgpack encoding for large whole numbers // https://github.com/hashicorp/terraform/commit/cd252557e4200e031b942d9ff35c455bb30d858f // This changes allows the math.MaxFloat32 value to succeed in planning but fail during apply. -// Terraform v1.9.0-alpha20240501 is the first Terraform version to use this updated encoding. +// Terraform v1.9.0 is the first Terraform version to use this updated encoding. func TestSchemaResource_Float64Attribute_Precision_MaxFloat32_TF1_9(t *testing.T) { resource.UnitTest(t, resource.TestCase{ TerraformVersionChecks: []tfversion.TerraformVersionCheck{ - tfversion.SkipBelow(version.Must(version.NewVersion("1.9.0-alpha20240501"))), + tfversion.SkipBelow(tfversion.Version1_9_0), }, ProtoV6ProviderFactories: map[string]func() (tfprotov6.ProviderServer, error){ "framework": providerserver.NewProtocol6WithError(New()),