diff --git a/helper/schema/shims_test.go b/helper/schema/shims_test.go index 072c8ca7c..e3e9df745 100644 --- a/helper/schema/shims_test.go +++ b/helper/schema/shims_test.go @@ -34,7 +34,7 @@ func testApplyDiff(t *testing.T, diff *terraform.InstanceDiff) { testSchema := providers.Schema{ - Version: uint64(resource.SchemaVersion), + Version: int64(resource.SchemaVersion), Block: resourceSchemaToBlock(resource.Schema), } @@ -338,7 +338,7 @@ func TestShimResourceDiff_Timeout_diff(t *testing.T) { } testSchema := providers.Schema{ - Version: uint64(r.SchemaVersion), + Version: int64(r.SchemaVersion), Block: resourceSchemaToBlock(r.Schema), } diff --git a/plugin/convert/schema.go b/plugin/convert/schema.go index a9f0d9f7d..db879b54d 100644 --- a/plugin/convert/schema.go +++ b/plugin/convert/schema.go @@ -57,7 +57,7 @@ func protoSchemaNestedBlock(name string, b *configschema.NestedBlock) *proto.Sch // ProtoToProviderSchema takes a proto.Schema and converts it to a providers.Schema. func ProtoToProviderSchema(s *proto.Schema) providers.Schema { return providers.Schema{ - Version: uint64(s.Version), + Version: s.Version, Block: ProtoToConfigSchema(s.Block), } } diff --git a/providers/provider.go b/providers/provider.go index 2db1aba12..a4e05d80a 100644 --- a/providers/provider.go +++ b/providers/provider.go @@ -86,7 +86,7 @@ type GetSchemaResponse struct { // Schema pairs a provider or resource schema with that schema's version. // This is used to be able to upgrade the schema in UpgradeResourceState. type Schema struct { - Version uint64 + Version int64 Block *configschema.Block } @@ -135,7 +135,7 @@ type UpgradeResourceStateRequest struct { TypeName string // Version is version of the schema that created the current state. - Version int + Version int64 // RawStateJSON and RawStateFlatmap contiain the state that needs to be // upgraded to match the current schema version. Because the schema is