/
resource.go
36 lines (31 loc) · 1.27 KB
/
resource.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package pluginsdk
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
// This file is intended to provide a transition from Plugin SDKv1 to Plugin SDKv2
// without introducing a merge conflict into every PR.
type (
BasicMapReader = schema.BasicMapReader
MapFieldReader = schema.MapFieldReader
MapFieldWriter = schema.MapFieldWriter
Resource = schema.Resource
ResourceData = schema.ResourceData
ResourceDiff = schema.ResourceDiff
SchemaDiffSuppressFunc = schema.SchemaDiffSuppressFunc
StateUpgrader = schema.StateUpgrader
SchemaValidateFunc = func(interface{}, string) ([]string, []error)
ValueType = schema.ValueType
)
type (
StateChangeConf = resource.StateChangeConf
StateRefreshFunc = resource.StateRefreshFunc
)
type (
// lint:ignore SA1019 SDKv2 migration - staticcheck's own linter directives are currently being ignored under golanci-lint
CreateFunc = schema.CreateFunc //nolint:staticcheck
DeleteFunc = schema.DeleteFunc //nolint:staticcheck
ExistsFunc = schema.ExistsFunc //nolint:staticcheck
ReadFunc = schema.ReadFunc //nolint:staticcheck
UpdateFunc = schema.UpdateFunc //nolint:staticcheck
)