Unconfigured represents a provider plugin that has not yet been configured. It has limited functionality that must not depend on ConfigureProvider having been called.
| 19 | // Unconfigured represents a provider plugin that has not yet been configured. It has |
| 20 | // limited functionality that must not depend on ConfigureProvider having been called. |
| 21 | type Unconfigured interface { |
| 22 | // GetMetadata is not yet implemented or used at this time. It may |
| 23 | // be used in the future to avoid loading a provider's full schema |
| 24 | // for initial validation. This could result in some potential |
| 25 | // memory savings. |
| 26 | |
| 27 | // GetSchema returns the complete schema for the provider. |
| 28 | GetProviderSchema(context.Context) GetProviderSchemaResponse |
| 29 | |
| 30 | // ValidateProviderConfig allows the provider to validate the configuration. |
| 31 | // The ValidateProviderConfigResponse.PreparedConfig field is unused. The |
| 32 | // final configuration is not stored in the state, and any modifications |
| 33 | // that need to be made must be made during the Configure method call. |
| 34 | ValidateProviderConfig(context.Context, ValidateProviderConfigRequest) ValidateProviderConfigResponse |
| 35 | |
| 36 | // ValidateResourceConfig allows the provider to validate the resource |
| 37 | // configuration values. |
| 38 | ValidateResourceConfig(context.Context, ValidateResourceConfigRequest) ValidateResourceConfigResponse |
| 39 | |
| 40 | // ValidateDataResourceConfig allows the provider to validate the data source |
| 41 | // configuration values. |
| 42 | ValidateDataResourceConfig(context.Context, ValidateDataResourceConfigRequest) ValidateDataResourceConfigResponse |
| 43 | |
| 44 | // ValidateEphemeralConfig allows the provider to validate the ephemeral resource |
| 45 | // configuration values. |
| 46 | ValidateEphemeralConfig(context.Context, ValidateEphemeralConfigRequest) ValidateEphemeralConfigResponse |
| 47 | |
| 48 | // MoveResourceState requests that the given resource data be moved from one |
| 49 | // type to another, potentially between providers as well. |
| 50 | MoveResourceState(context.Context, MoveResourceStateRequest) MoveResourceStateResponse |
| 51 | |
| 52 | // CallFunction requests that the given function is called and response returned. |
| 53 | // There is a bit of a quirk in OpenTofu-land. We allow providers to supply |
| 54 | // additional functions via GetFunctions() after configuration. Those functions |
| 55 | // will only be available via CallFunction after ConfigureProvider is called. |
| 56 | CallFunction(context.Context, CallFunctionRequest) CallFunctionResponse |
| 57 | |
| 58 | // Configure configures and initialized the provider. |
| 59 | ConfigureProvider(context.Context, ConfigureProviderRequest) ConfigureProviderResponse |
| 60 | |
| 61 | // Close shuts down the plugin process if applicable. |
| 62 | Close(context.Context) error |
| 63 | |
| 64 | // Stop is called when the provider should halt any in-flight actions. |
| 65 | // |
| 66 | // Stop should not block waiting for in-flight actions to complete. It |
| 67 | // should take any action it wants and return immediately acknowledging it |
| 68 | // has received the stop request. OpenTofu will not make any further API |
| 69 | // calls to the provider after Stop is called. |
| 70 | // |
| 71 | // The given context is guaranteed not to be cancelled and to have no |
| 72 | // deadline, but the contexts visible to other provider methods |
| 73 | // running concurrently might be cancelled either before or after |
| 74 | // Stop call. Any provider other operations that need to be able to continue |
| 75 | // when reacting to Stop must use [context.WithoutCancel], or equivalent, |
| 76 | // to insulate themselves from any incoming cancellation/deadline signals. |
| 77 | // |
| 78 | // The error returned, if non-nil, is assumed to mean that signaling the |
no outgoing calls
no test coverage detected