mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-19 17:59:05 -05:00
build: Use Go 1.19
Go 1.19's "fmt" has some awareness of the new doc comment formatting conventions and adjusts the presentation of the source comments to make it clearer how godoc would interpret them. Therefore this commit includes various updates made by "go fmt" to acheve that. In line with our usual convention that we make stylistic/grammar/spelling tweaks typically only when we're "in the area" changing something else anyway, I also took this opportunity to review most of the comments that this updated to see if there were any other opportunities to improve them.
This commit is contained in:
@@ -1 +1 @@
|
||||
1.18.1
|
||||
1.19.0
|
||||
|
||||
@@ -3,6 +3,7 @@ package main
|
||||
// experimentsAllowed can be set to any non-empty string using Go linker
|
||||
// arguments in order to enable the use of experimental features for a
|
||||
// particular Terraform build:
|
||||
//
|
||||
// go install -ldflags="-X 'main.experimentsAllowed=yes'"
|
||||
//
|
||||
// By default this variable is initialized as empty, in which case
|
||||
|
||||
@@ -59,9 +59,10 @@ func (c checkable) checkableSigil() {
|
||||
}
|
||||
|
||||
// CheckType describes the category of check.
|
||||
//go:generate go run golang.org/x/tools/cmd/stringer -type=CheckType check.go
|
||||
type CheckType int
|
||||
|
||||
//go:generate go run golang.org/x/tools/cmd/stringer -type=CheckType check.go
|
||||
|
||||
const (
|
||||
InvalidCondition CheckType = 0
|
||||
ResourcePrecondition CheckType = 1
|
||||
|
||||
@@ -112,14 +112,16 @@ func NewLegacyProvider(name string) Provider {
|
||||
}
|
||||
}
|
||||
|
||||
// ParseProviderSourceString parses the source attribute and returns a provider.
|
||||
// This is intended primarily to parse the FQN-like strings returned by
|
||||
// terraform-config-inspect.
|
||||
// ParseProviderSourceString parses a value of the form expected in the "source"
|
||||
// argument of a required_providers entry and returns the corresponding
|
||||
// fully-qualified provider address. This is intended primarily to parse the
|
||||
// FQN-like strings returned by terraform-config-inspect.
|
||||
//
|
||||
// The following are valid source string formats:
|
||||
// name
|
||||
// namespace/name
|
||||
// hostname/namespace/name
|
||||
//
|
||||
// - name
|
||||
// - namespace/name
|
||||
// - hostname/namespace/name
|
||||
func ParseProviderSourceString(str string) (tfaddr.Provider, tfdiags.Diagnostics) {
|
||||
var diags tfdiags.Diagnostics
|
||||
|
||||
|
||||
@@ -95,18 +95,18 @@ type AbsProviderConfig struct {
|
||||
var _ ProviderConfig = AbsProviderConfig{}
|
||||
|
||||
// ParseAbsProviderConfig parses the given traversal as an absolute provider
|
||||
// address. The following are examples of traversals that can be successfully
|
||||
// parsed as absolute provider configuration addresses:
|
||||
// configuration address. The following are examples of traversals that can be
|
||||
// successfully parsed as absolute provider configuration addresses:
|
||||
//
|
||||
// provider["registry.terraform.io/hashicorp/aws"]
|
||||
// provider["registry.terraform.io/hashicorp/aws"].foo
|
||||
// module.bar.provider["registry.terraform.io/hashicorp/aws"]
|
||||
// module.bar.module.baz.provider["registry.terraform.io/hashicorp/aws"].foo
|
||||
// - provider["registry.terraform.io/hashicorp/aws"]
|
||||
// - provider["registry.terraform.io/hashicorp/aws"].foo
|
||||
// - module.bar.provider["registry.terraform.io/hashicorp/aws"]
|
||||
// - module.bar.module.baz.provider["registry.terraform.io/hashicorp/aws"].foo
|
||||
//
|
||||
// This type of address is used, for example, to record the relationships
|
||||
// between resources and provider configurations in the state structure.
|
||||
// This type of address is not generally used in the UI, except in error
|
||||
// messages that refer to provider configurations.
|
||||
// This type of address is typically not used prominently in the UI, except in
|
||||
// error messages that refer to provider configurations.
|
||||
func ParseAbsProviderConfig(traversal hcl.Traversal) (AbsProviderConfig, tfdiags.Diagnostics) {
|
||||
modInst, remain, diags := parseModuleInstancePrefix(traversal)
|
||||
var ret AbsProviderConfig
|
||||
@@ -230,17 +230,22 @@ func ParseLegacyAbsProviderConfigStr(str string) (AbsProviderConfig, tfdiags.Dia
|
||||
}
|
||||
|
||||
// ParseLegacyAbsProviderConfig parses the given traversal as an absolute
|
||||
// provider address. The following are examples of traversals that can be
|
||||
// successfully parsed as legacy absolute provider configuration addresses:
|
||||
// provider address in the legacy form used by Terraform v0.12 and earlier.
|
||||
// The following are examples of traversals that can be successfully parsed as
|
||||
// legacy absolute provider configuration addresses:
|
||||
//
|
||||
// provider.aws
|
||||
// provider.aws.foo
|
||||
// module.bar.provider.aws
|
||||
// module.bar.module.baz.provider.aws.foo
|
||||
// - provider.aws
|
||||
// - provider.aws.foo
|
||||
// - module.bar.provider.aws
|
||||
// - module.bar.module.baz.provider.aws.foo
|
||||
//
|
||||
// This type of address is used in legacy state and may appear in state v4 if
|
||||
// the provider config addresses have not been normalized to include provider
|
||||
// FQN.
|
||||
// We can encounter this kind of address in a historical state snapshot that
|
||||
// hasn't yet been upgraded by refreshing or applying a plan with
|
||||
// Terraform v0.13. Later versions of Terraform reject state snapshots using
|
||||
// this format, and so users must follow the Terraform v0.13 upgrade guide
|
||||
// in that case.
|
||||
//
|
||||
// We will not use this address form for any new file formats.
|
||||
func ParseLegacyAbsProviderConfig(traversal hcl.Traversal) (AbsProviderConfig, tfdiags.Diagnostics) {
|
||||
modInst, remain, diags := parseModuleInstancePrefix(traversal)
|
||||
var ret AbsProviderConfig
|
||||
@@ -383,12 +388,12 @@ func (pc AbsProviderConfig) LegacyString() string {
|
||||
return fmt.Sprintf("%s.%s.%s", pc.Module.String(), "provider", pc.Provider.LegacyString())
|
||||
}
|
||||
|
||||
// String() returns a string representation of an AbsProviderConfig in the following format:
|
||||
// String() returns a string representation of an AbsProviderConfig in a format like the following examples:
|
||||
//
|
||||
// provider["example.com/namespace/name"]
|
||||
// provider["example.com/namespace/name"].alias
|
||||
// module.module-name.provider["example.com/namespace/name"]
|
||||
// module.module-name.provider["example.com/namespace/name"].alias
|
||||
// - provider["example.com/namespace/name"]
|
||||
// - provider["example.com/namespace/name"].alias
|
||||
// - module.module-name.provider["example.com/namespace/name"]
|
||||
// - module.module-name.provider["example.com/namespace/name"].alias
|
||||
func (pc AbsProviderConfig) String() string {
|
||||
var parts []string
|
||||
if len(pc.Module) > 0 {
|
||||
|
||||
@@ -920,6 +920,7 @@ func (b *Cloud) IsLocalOperations() bool {
|
||||
// as a helper to wrap any potentially colored strings.
|
||||
//
|
||||
// TODO SvH: Rename this back to Colorize as soon as we can pass -no-color.
|
||||
//
|
||||
//lint:ignore U1000 see above todo
|
||||
func (b *Cloud) cliColorize() *colorstring.Colorize {
|
||||
if b.CLIColor != nil {
|
||||
|
||||
@@ -294,9 +294,9 @@ type ProviderInstallationMethod struct {
|
||||
// different installation location types. The concrete implementations of
|
||||
// this interface are:
|
||||
//
|
||||
// ProviderInstallationDirect: install from the provider's origin registry
|
||||
// ProviderInstallationFilesystemMirror(dir): install from a local filesystem mirror
|
||||
// ProviderInstallationNetworkMirror(host): install from a network mirror
|
||||
// - [ProviderInstallationDirect]: install from the provider's origin registry
|
||||
// - [ProviderInstallationFilesystemMirror] (dir): install from a local filesystem mirror
|
||||
// - [ProviderInstallationNetworkMirror] (host): install from a network mirror
|
||||
type ProviderInstallationLocation interface {
|
||||
providerInstallationLocation()
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ func TestMain(m *testing.M) {
|
||||
|
||||
// tempWorkingDir constructs a workdir.Dir object referring to a newly-created
|
||||
// temporary directory. The temporary directory is automatically removed when
|
||||
//the test and all its subtests complete.
|
||||
// the test and all its subtests complete.
|
||||
//
|
||||
// Although workdir.Dir is built to support arbitrary base directories, the
|
||||
// not-yet-migrated behaviors in command.Meta tend to expect the root module
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Package e2etest contains a small number of tests that run against a real
|
||||
// Terraform binary, compiled on the fly at the start of the test run.
|
||||
// Package e2etest contains a set of tests that run against a real Terraform
|
||||
// binary, compiled on the fly at the start of the test run.
|
||||
//
|
||||
// These tests help ensure that key end-to-end Terraform use-cases are working
|
||||
// for a real binary, whereas other tests always have at least _some_ amount
|
||||
@@ -20,8 +20,8 @@
|
||||
// Alternatively, the make-archive.sh script can be used to produce a
|
||||
// self-contained zip file that can be shipped to another machine to run
|
||||
// the tests there without needing a locally-installed Go compiler. This
|
||||
// is primarily useful for testing cross-compiled builds. For more information,
|
||||
// see the commentary in make-archive.sh.
|
||||
// is primarily useful for testing cross-compiled builds during our release
|
||||
// process. For more information, see the commentary in make-archive.sh.
|
||||
//
|
||||
// The TF_ACC environment variable must be set for the tests to reach out
|
||||
// to external network services. Since these are end-to-end tests, only a
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# archive that can be extracted on a Windows system to run the e2e tests there:
|
||||
# $ GOOS=windows GOARCH=amd64 ./make-archive.sh
|
||||
#
|
||||
# This will produce a zip file build/terraform-s2stest_windows_amd64.zip which
|
||||
# This will produce a zip file build/terraform-e2etest_windows_amd64.zip which
|
||||
# can be shipped off to a Windows amd64 system, extracted to some directory,
|
||||
# and then executed as follows:
|
||||
# set TF_ACC=1
|
||||
|
||||
@@ -716,8 +716,8 @@ func actionString(action string) []string {
|
||||
// indexes.
|
||||
//
|
||||
// JavaScript (or similar dynamic language) consumers of these values can
|
||||
// recursively apply the steps to a given object using an index operation for
|
||||
// each step.
|
||||
// iterate over the the steps starting from the root object to reach the
|
||||
// value that each path is describing.
|
||||
func encodePaths(pathSet cty.PathSet) (json.RawMessage, error) {
|
||||
if pathSet.Empty() {
|
||||
return nil, nil
|
||||
|
||||
@@ -117,7 +117,7 @@ func (l *Loader) IsConfigDir(path string) bool {
|
||||
return l.parser.IsConfigDir(path)
|
||||
}
|
||||
|
||||
// ImportSources writes into the receiver's source code the given source
|
||||
// ImportSources writes into the receiver's source code map the given source
|
||||
// code buffers.
|
||||
//
|
||||
// This is useful in the situation where an ancillary loader is created for
|
||||
|
||||
@@ -208,9 +208,10 @@ func TestModule_required_provider_overrides(t *testing.T) {
|
||||
// Resources without explicit provider configuration are assigned a provider
|
||||
// implied based on the resource type. For example, this resource:
|
||||
//
|
||||
// resource foo_instance "test" { }
|
||||
// resource "foo_instance" "test" {}
|
||||
//
|
||||
// is assigned a provider with type "foo".
|
||||
// ...is assigned to whichever provider has local name "foo" in the current
|
||||
// module.
|
||||
//
|
||||
// To find the correct provider, we first look in the module's provider
|
||||
// requirements map for a local name matching the resource type, and fall back
|
||||
|
||||
@@ -156,8 +156,8 @@ func (p *Provider) moduleUniqueKey() string {
|
||||
// that can be successfully parsed as compact relative provider configuration
|
||||
// addresses:
|
||||
//
|
||||
// aws
|
||||
// aws.foo
|
||||
// - aws
|
||||
// - aws.foo
|
||||
//
|
||||
// This function will panic if given a relative traversal.
|
||||
//
|
||||
|
||||
@@ -14,9 +14,9 @@ package configs
|
||||
// are in the documentation for each constant in this enumeration, but in
|
||||
// summary:
|
||||
//
|
||||
// TypeHintString requires a primitive type
|
||||
// TypeHintList requires a type that could be converted to a tuple
|
||||
// TypeHintMap requires a type that could be converted to an object
|
||||
// - TypeHintString requires a primitive type
|
||||
// - TypeHintList requires a type that could be converted to a tuple
|
||||
// - TypeHintMap requires a type that could be converted to an object
|
||||
type VariableTypeHint rune
|
||||
|
||||
//go:generate go run golang.org/x/tools/cmd/stringer -type VariableTypeHint
|
||||
|
||||
@@ -10,9 +10,7 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
//
|
||||
// Lean on the standard net lib as much as possible.
|
||||
//
|
||||
type IPMask = stdnet.IPMask
|
||||
|
||||
var IPv4Mask = stdnet.IPv4Mask
|
||||
|
||||
@@ -670,8 +670,10 @@ func Index(list, value cty.Value) (cty.Value, error) {
|
||||
return IndexFunc.Call([]cty.Value{list, value})
|
||||
}
|
||||
|
||||
// List takes any number of list arguments and returns a list containing those
|
||||
// values in the same order.
|
||||
// List takes any number of arguments of types that can unify into a single
|
||||
// type and returns a list containing those values in the same order, or
|
||||
// returns an error if there is no single element type that all values can
|
||||
// convert to.
|
||||
func List(args ...cty.Value) (cty.Value, error) {
|
||||
return ListFunc.Call(args)
|
||||
}
|
||||
|
||||
@@ -153,7 +153,6 @@ func unsupportedTimeoutKeyError(key string) error {
|
||||
//
|
||||
// StateEncode encodes the timeout into the ResourceData's InstanceState for
|
||||
// saving to state
|
||||
//
|
||||
func (t *ResourceTimeout) DiffEncode(id *terraform.InstanceDiff) error {
|
||||
return t.metaEncode(id)
|
||||
}
|
||||
|
||||
@@ -92,7 +92,9 @@ func (r *ResourceAddress) String() string {
|
||||
|
||||
// HasResourceSpec returns true if the address has a resource spec, as
|
||||
// defined in the documentation:
|
||||
//
|
||||
// https://www.terraform.io/docs/cli/state/resource-addressing.html
|
||||
//
|
||||
// In particular, this returns false if the address contains only
|
||||
// a module path, thus addressing the entire module.
|
||||
func (r *ResourceAddress) HasResourceSpec() bool {
|
||||
|
||||
@@ -1425,7 +1425,6 @@ func ParseResourceStateKey(k string) (*ResourceStateKey, error) {
|
||||
//
|
||||
// Extra is just extra data that a provider can return that we store
|
||||
// for later, but is not exposed in any way to the user.
|
||||
//
|
||||
type ResourceState struct {
|
||||
// This is filled in and managed by Terraform, and is the resource
|
||||
// type itself such as "mycloud_instance". If a resource provider sets
|
||||
|
||||
@@ -106,6 +106,7 @@ func (c *Changes) ResourceInstanceDeposed(addr addrs.AbsResourceInstance, key st
|
||||
}
|
||||
|
||||
// OutputValue returns the planned change for the output value with the
|
||||
//
|
||||
// given address, if any. Returns nil if no change is planned.
|
||||
func (c *Changes) OutputValue(addr addrs.AbsOutputValue) *OutputChangeSrc {
|
||||
for _, oc := range c.Outputs {
|
||||
|
||||
@@ -810,6 +810,7 @@ type ConditionResult struct {
|
||||
// condition depends on values which are only known at apply time.
|
||||
//
|
||||
// Types that are assignable to Result:
|
||||
//
|
||||
// *ConditionResult_Value
|
||||
// *ConditionResult_Unknown
|
||||
Result isConditionResult_Result `protobuf_oneof:"result"`
|
||||
@@ -1086,6 +1087,7 @@ type Path_Step struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Selector:
|
||||
//
|
||||
// *Path_Step_AttributeName
|
||||
// *Path_Step_ElementKey
|
||||
Selector isPath_Step_Selector `protobuf_oneof:"selector"`
|
||||
|
||||
@@ -47,11 +47,11 @@ func simpleMockPluginLibrary() *contextPlugins {
|
||||
//
|
||||
// The returned schema contains the following optional attributes:
|
||||
//
|
||||
// test_string, of type string
|
||||
// test_number, of type number
|
||||
// test_bool, of type bool
|
||||
// test_list, of type list(string)
|
||||
// test_map, of type map(string)
|
||||
// - test_string, of type string
|
||||
// - test_number, of type number
|
||||
// - test_bool, of type bool
|
||||
// - test_list, of type list(string)
|
||||
// - test_map, of type map(string)
|
||||
//
|
||||
// Each call to this function produces an entirely new schema instance, so
|
||||
// callers can feel free to modify it once returned.
|
||||
|
||||
@@ -10,17 +10,18 @@ import (
|
||||
"github.com/hashicorp/terraform/internal/tfdiags"
|
||||
)
|
||||
|
||||
// PlanGraphBuilder implements GraphBuilder and is responsible for building
|
||||
// a graph for planning (creating a Terraform Diff).
|
||||
// PlanGraphBuilder is a GraphBuilder implementation that builds a graph for
|
||||
// planning and for other "plan-like" operations which don't require an
|
||||
// already-calculated plan as input.
|
||||
//
|
||||
// The primary difference between this graph and others:
|
||||
// Unlike the apply graph builder, this graph builder:
|
||||
//
|
||||
// * Based on the config since it represents the target state
|
||||
//
|
||||
// * Ignores lifecycle options since no lifecycle events occur here. This
|
||||
// simplifies the graph significantly since complex transforms such as
|
||||
// create-before-destroy can be completely ignored.
|
||||
// - Makes its decisions primarily based on the given configuration, which
|
||||
// represents the desired state.
|
||||
//
|
||||
// - Ignores certain lifecycle concerns like create_before_destroy, because
|
||||
// those are only important once we already know what action we're planning
|
||||
// to take against a particular resource instance.
|
||||
type PlanGraphBuilder struct {
|
||||
// Config is the configuration tree to build a plan from.
|
||||
Config *configs.Config
|
||||
|
||||
@@ -323,10 +323,10 @@ func TestNodeApplyableProvider_Validate(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
//This test specifically tests responses from the
|
||||
//providers.ValidateProviderConfigFn. See
|
||||
//TestNodeApplyableProvider_ConfigProvider_config_fn_err for
|
||||
//providers.ConfigureProviderRequest responses.
|
||||
// This test specifically tests responses from the
|
||||
// providers.ValidateProviderConfigFn. See
|
||||
// TestNodeApplyableProvider_ConfigProvider_config_fn_err for
|
||||
// providers.ConfigureProviderRequest responses.
|
||||
func TestNodeApplyableProvider_ConfigProvider(t *testing.T) {
|
||||
provider := mockProviderWithConfigSchema(&configschema.Block{
|
||||
Attributes: map[string]*configschema.Attribute{
|
||||
@@ -409,7 +409,7 @@ func TestNodeApplyableProvider_ConfigProvider(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
//This test is similar to TestNodeApplyableProvider_ConfigProvider, but tests responses from the providers.ConfigureProviderRequest
|
||||
// This test is similar to TestNodeApplyableProvider_ConfigProvider, but tests responses from the providers.ConfigureProviderRequest
|
||||
func TestNodeApplyableProvider_ConfigProvider_config_fn_err(t *testing.T) {
|
||||
provider := mockProviderWithConfigSchema(&configschema.Block{
|
||||
Attributes: map[string]*configschema.Attribute{
|
||||
|
||||
@@ -475,7 +475,7 @@ func (n *NodeAbstractResource) readResourceInstanceStateDeposed(ctx EvalContext,
|
||||
// same module.
|
||||
//
|
||||
// This result can be used as a way to compensate for the effects of
|
||||
// conservative analyses passes in our graph builders which make their
|
||||
// conservative analysis passes in our graph builders which make their
|
||||
// decisions based only on unexpanded addresses, often so that they can behave
|
||||
// correctly for interactions between expanded and not-yet-expanded objects.
|
||||
//
|
||||
|
||||
@@ -92,15 +92,15 @@ func (t *ForcedCBDTransformer) hasCBDDescendent(g *Graph, v dag.Vertex) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// CBDEdgeTransformer modifies the edges of CBD nodes that went through
|
||||
// the DestroyEdgeTransformer to have the right dependencies. There are
|
||||
// two real tasks here:
|
||||
// CBDEdgeTransformer modifies the edges of create-before-destroy ("CBD") nodes
|
||||
// that went through the DestroyEdgeTransformer so that they will have the
|
||||
// correct dependencies. There are two parts to this:
|
||||
//
|
||||
// 1. With CBD, the destroy edge is inverted: the destroy depends on
|
||||
// the creation.
|
||||
//
|
||||
// 2. A_d must depend on resources that depend on A. This is to enable
|
||||
// the destroy to only happen once nodes that depend on A successfully
|
||||
// 2. Destroy for A must depend on resources that depend on A. This is to
|
||||
// allow the destroy to only happen once nodes that depend on A successfully
|
||||
// update to A. Example: adding a web server updates the load balancer
|
||||
// before deleting the old web server.
|
||||
//
|
||||
|
||||
@@ -129,9 +129,9 @@ func (diags Diagnostics) ForRPC() Diagnostics {
|
||||
// if the diagnostics list does not include any error-level diagnostics.
|
||||
//
|
||||
// This can be used to smuggle diagnostics through an API that deals in
|
||||
// native errors, but unfortunately it will lose naked warnings (warnings
|
||||
// that aren't accompanied by at least one error) since such APIs have no
|
||||
// mechanism through which to report these.
|
||||
// native errors, but unfortunately it will lose any warnings that aren't
|
||||
// accompanied by at least one error since such APIs have no mechanism through
|
||||
// which to report those.
|
||||
//
|
||||
// return result, diags.Error()
|
||||
func (diags Diagnostics) Err() error {
|
||||
|
||||
@@ -1065,6 +1065,7 @@ type AttributePath_Step struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Selector:
|
||||
//
|
||||
// *AttributePath_Step_AttributeName
|
||||
// *AttributePath_Step_ElementKeyString
|
||||
// *AttributePath_Step_ElementKeyInt
|
||||
@@ -4701,21 +4702,21 @@ const _ = grpc.SupportPackageIsVersion6
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type ProviderClient interface {
|
||||
//////// Information about what a provider supports/expects
|
||||
// ////// Information about what a provider supports/expects
|
||||
GetSchema(ctx context.Context, in *GetProviderSchema_Request, opts ...grpc.CallOption) (*GetProviderSchema_Response, error)
|
||||
PrepareProviderConfig(ctx context.Context, in *PrepareProviderConfig_Request, opts ...grpc.CallOption) (*PrepareProviderConfig_Response, error)
|
||||
ValidateResourceTypeConfig(ctx context.Context, in *ValidateResourceTypeConfig_Request, opts ...grpc.CallOption) (*ValidateResourceTypeConfig_Response, error)
|
||||
ValidateDataSourceConfig(ctx context.Context, in *ValidateDataSourceConfig_Request, opts ...grpc.CallOption) (*ValidateDataSourceConfig_Response, error)
|
||||
UpgradeResourceState(ctx context.Context, in *UpgradeResourceState_Request, opts ...grpc.CallOption) (*UpgradeResourceState_Response, error)
|
||||
//////// One-time initialization, called before other functions below
|
||||
// ////// One-time initialization, called before other functions below
|
||||
Configure(ctx context.Context, in *Configure_Request, opts ...grpc.CallOption) (*Configure_Response, error)
|
||||
//////// Managed Resource Lifecycle
|
||||
// ////// Managed Resource Lifecycle
|
||||
ReadResource(ctx context.Context, in *ReadResource_Request, opts ...grpc.CallOption) (*ReadResource_Response, error)
|
||||
PlanResourceChange(ctx context.Context, in *PlanResourceChange_Request, opts ...grpc.CallOption) (*PlanResourceChange_Response, error)
|
||||
ApplyResourceChange(ctx context.Context, in *ApplyResourceChange_Request, opts ...grpc.CallOption) (*ApplyResourceChange_Response, error)
|
||||
ImportResourceState(ctx context.Context, in *ImportResourceState_Request, opts ...grpc.CallOption) (*ImportResourceState_Response, error)
|
||||
ReadDataSource(ctx context.Context, in *ReadDataSource_Request, opts ...grpc.CallOption) (*ReadDataSource_Response, error)
|
||||
//////// Graceful Shutdown
|
||||
// ////// Graceful Shutdown
|
||||
Stop(ctx context.Context, in *Stop_Request, opts ...grpc.CallOption) (*Stop_Response, error)
|
||||
}
|
||||
|
||||
@@ -4837,21 +4838,21 @@ func (c *providerClient) Stop(ctx context.Context, in *Stop_Request, opts ...grp
|
||||
|
||||
// ProviderServer is the server API for Provider service.
|
||||
type ProviderServer interface {
|
||||
//////// Information about what a provider supports/expects
|
||||
// ////// Information about what a provider supports/expects
|
||||
GetSchema(context.Context, *GetProviderSchema_Request) (*GetProviderSchema_Response, error)
|
||||
PrepareProviderConfig(context.Context, *PrepareProviderConfig_Request) (*PrepareProviderConfig_Response, error)
|
||||
ValidateResourceTypeConfig(context.Context, *ValidateResourceTypeConfig_Request) (*ValidateResourceTypeConfig_Response, error)
|
||||
ValidateDataSourceConfig(context.Context, *ValidateDataSourceConfig_Request) (*ValidateDataSourceConfig_Response, error)
|
||||
UpgradeResourceState(context.Context, *UpgradeResourceState_Request) (*UpgradeResourceState_Response, error)
|
||||
//////// One-time initialization, called before other functions below
|
||||
// ////// One-time initialization, called before other functions below
|
||||
Configure(context.Context, *Configure_Request) (*Configure_Response, error)
|
||||
//////// Managed Resource Lifecycle
|
||||
// ////// Managed Resource Lifecycle
|
||||
ReadResource(context.Context, *ReadResource_Request) (*ReadResource_Response, error)
|
||||
PlanResourceChange(context.Context, *PlanResourceChange_Request) (*PlanResourceChange_Response, error)
|
||||
ApplyResourceChange(context.Context, *ApplyResourceChange_Request) (*ApplyResourceChange_Response, error)
|
||||
ImportResourceState(context.Context, *ImportResourceState_Request) (*ImportResourceState_Response, error)
|
||||
ReadDataSource(context.Context, *ReadDataSource_Request) (*ReadDataSource_Response, error)
|
||||
//////// Graceful Shutdown
|
||||
// ////// Graceful Shutdown
|
||||
Stop(context.Context, *Stop_Request) (*Stop_Response, error)
|
||||
}
|
||||
|
||||
|
||||
@@ -1006,6 +1006,7 @@ type AttributePath_Step struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Selector:
|
||||
//
|
||||
// *AttributePath_Step_AttributeName
|
||||
// *AttributePath_Step_ElementKeyString
|
||||
// *AttributePath_Step_ElementKeyInt
|
||||
@@ -4269,21 +4270,21 @@ const _ = grpc.SupportPackageIsVersion6
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type ProviderClient interface {
|
||||
//////// Information about what a provider supports/expects
|
||||
// ////// Information about what a provider supports/expects
|
||||
GetProviderSchema(ctx context.Context, in *GetProviderSchema_Request, opts ...grpc.CallOption) (*GetProviderSchema_Response, error)
|
||||
ValidateProviderConfig(ctx context.Context, in *ValidateProviderConfig_Request, opts ...grpc.CallOption) (*ValidateProviderConfig_Response, error)
|
||||
ValidateResourceConfig(ctx context.Context, in *ValidateResourceConfig_Request, opts ...grpc.CallOption) (*ValidateResourceConfig_Response, error)
|
||||
ValidateDataResourceConfig(ctx context.Context, in *ValidateDataResourceConfig_Request, opts ...grpc.CallOption) (*ValidateDataResourceConfig_Response, error)
|
||||
UpgradeResourceState(ctx context.Context, in *UpgradeResourceState_Request, opts ...grpc.CallOption) (*UpgradeResourceState_Response, error)
|
||||
//////// One-time initialization, called before other functions below
|
||||
// ////// One-time initialization, called before other functions below
|
||||
ConfigureProvider(ctx context.Context, in *ConfigureProvider_Request, opts ...grpc.CallOption) (*ConfigureProvider_Response, error)
|
||||
//////// Managed Resource Lifecycle
|
||||
// ////// Managed Resource Lifecycle
|
||||
ReadResource(ctx context.Context, in *ReadResource_Request, opts ...grpc.CallOption) (*ReadResource_Response, error)
|
||||
PlanResourceChange(ctx context.Context, in *PlanResourceChange_Request, opts ...grpc.CallOption) (*PlanResourceChange_Response, error)
|
||||
ApplyResourceChange(ctx context.Context, in *ApplyResourceChange_Request, opts ...grpc.CallOption) (*ApplyResourceChange_Response, error)
|
||||
ImportResourceState(ctx context.Context, in *ImportResourceState_Request, opts ...grpc.CallOption) (*ImportResourceState_Response, error)
|
||||
ReadDataSource(ctx context.Context, in *ReadDataSource_Request, opts ...grpc.CallOption) (*ReadDataSource_Response, error)
|
||||
//////// Graceful Shutdown
|
||||
// ////// Graceful Shutdown
|
||||
StopProvider(ctx context.Context, in *StopProvider_Request, opts ...grpc.CallOption) (*StopProvider_Response, error)
|
||||
}
|
||||
|
||||
@@ -4405,21 +4406,21 @@ func (c *providerClient) StopProvider(ctx context.Context, in *StopProvider_Requ
|
||||
|
||||
// ProviderServer is the server API for Provider service.
|
||||
type ProviderServer interface {
|
||||
//////// Information about what a provider supports/expects
|
||||
// ////// Information about what a provider supports/expects
|
||||
GetProviderSchema(context.Context, *GetProviderSchema_Request) (*GetProviderSchema_Response, error)
|
||||
ValidateProviderConfig(context.Context, *ValidateProviderConfig_Request) (*ValidateProviderConfig_Response, error)
|
||||
ValidateResourceConfig(context.Context, *ValidateResourceConfig_Request) (*ValidateResourceConfig_Response, error)
|
||||
ValidateDataResourceConfig(context.Context, *ValidateDataResourceConfig_Request) (*ValidateDataResourceConfig_Response, error)
|
||||
UpgradeResourceState(context.Context, *UpgradeResourceState_Request) (*UpgradeResourceState_Response, error)
|
||||
//////// One-time initialization, called before other functions below
|
||||
// ////// One-time initialization, called before other functions below
|
||||
ConfigureProvider(context.Context, *ConfigureProvider_Request) (*ConfigureProvider_Response, error)
|
||||
//////// Managed Resource Lifecycle
|
||||
// ////// Managed Resource Lifecycle
|
||||
ReadResource(context.Context, *ReadResource_Request) (*ReadResource_Response, error)
|
||||
PlanResourceChange(context.Context, *PlanResourceChange_Request) (*PlanResourceChange_Response, error)
|
||||
ApplyResourceChange(context.Context, *ApplyResourceChange_Request) (*ApplyResourceChange_Response, error)
|
||||
ImportResourceState(context.Context, *ImportResourceState_Request) (*ImportResourceState_Response, error)
|
||||
ReadDataSource(context.Context, *ReadDataSource_Request) (*ReadDataSource_Response, error)
|
||||
//////// Graceful Shutdown
|
||||
// ////// Graceful Shutdown
|
||||
StopProvider(context.Context, *StopProvider_Request) (*StopProvider_Response, error)
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ func TypeConstraintFromVal(v cty.Value) cty.Type {
|
||||
// ConvertFunc is a cty function that implements type conversions.
|
||||
//
|
||||
// Its signature is as follows:
|
||||
//
|
||||
// convert(value, type_constraint)
|
||||
//
|
||||
// ...where type_constraint is a type constraint expression as defined by
|
||||
|
||||
Reference in New Issue
Block a user