import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import Long from "long"; import type { CallContext, CallOptions } from "nice-grpc-common"; import { Timestamp } from "./google/protobuf/timestamp"; export declare const protobufPackage = "tfplugin6"; /** * Terraform Plugin RPC protocol version 6.11 * * This file defines version 6.11 of the RPC protocol. To implement a plugin * against this protocol, copy this definition into your own codebase and * use protoc to generate stubs for your target language. * * Any minor versions of protocol 6 to follow should modify this file while * maintaining backwards compatibility. Breaking changes, if any are required, * will come in a subsequent major version with its own separate proto definition. * * Note that only the proto files included in a release tag of Terraform are * official protocol releases. Proto files taken from other commits may include * incomplete changes or features that did not make it into a final release. * In all reasonable cases, plugin developers should take the proto file from * the tag of the most recent release of Terraform, and not from the main * branch or any other development branch. */ export declare enum StringKind { PLAIN = 0, MARKDOWN = 1, UNRECOGNIZED = -1 } export declare function stringKindFromJSON(object: any): StringKind; export declare function stringKindToJSON(object: StringKind): string; /** * DynamicValue is an opaque encoding of terraform data, with the field name * indicating the encoding scheme used. */ export interface DynamicValue { msgpack: Uint8Array; json: Uint8Array; } export interface Diagnostic { severity: Diagnostic_Severity; summary: string; detail: string; attribute: AttributePath | undefined; } export declare enum Diagnostic_Severity { INVALID = 0, ERROR = 1, WARNING = 2, UNRECOGNIZED = -1 } export declare function diagnostic_SeverityFromJSON(object: any): Diagnostic_Severity; export declare function diagnostic_SeverityToJSON(object: Diagnostic_Severity): string; export interface FunctionError { text: string; /** * The optional function_argument records the index position of the * argument which caused the error. */ functionArgument?: Long | undefined; } export interface AttributePath { steps: AttributePath_Step[]; } export interface AttributePath_Step { /** * Set "attribute_name" to represent looking up an attribute * in the current object value. */ attributeName?: string | undefined; /** * Set "element_key_*" to represent looking up an element in * an indexable collection type. */ elementKeyString?: string | undefined; elementKeyInt?: Long | undefined; } export interface StopProvider { } export interface StopProvider_Request { } export interface StopProvider_Response { Error: string; } /** * RawState holds the stored state for a resource to be upgraded by the * provider. It can be in one of two formats, the current json encoded format * in bytes, or the legacy flatmap format as a map of strings. */ export interface RawState { json: Uint8Array; flatmap: { [key: string]: string; }; } export interface RawState_FlatmapEntry { key: string; value: string; } /** * ResourceIdentitySchema represents the structure and types of data used to identify * a managed resource type. Effectively, resource identity is a versioned object * that can be used to compare resources, whether already managed and/or being * discovered. */ export interface ResourceIdentitySchema { /** * version is the identity version and separate from the Schema version. * Any time the structure or format of identity_attributes changes, this version * should be incremented. Versioning implicitly starts at 0 and by convention * should be incremented by 1 each change. * * When comparing identity_attributes data, differing versions should always be treated * as inequal. */ version: Long; /** * identity_attributes are the individual value definitions which define identity data * for a managed resource type. This information is used to decode DynamicValue of * identity data. * * These attributes are intended for permanent identity data and must be wholly * representative of all data necessary to compare two managed resource instances * with no other data. This generally should include account, endpoint, location, * and automatically generated identifiers. For some resources, this may include * configuration-based data, such as a required name which must be unique. */ identityAttributes: ResourceIdentitySchema_IdentityAttribute[]; } /** * IdentityAttribute represents one value of data within resource identity. These * are always used in resource identity comparisons. */ export interface ResourceIdentitySchema_IdentityAttribute { /** name is the identity attribute name */ name: string; /** type is the identity attribute type */ type: Uint8Array; /** * required_for_import when enabled signifies that this attribute must be * defined for ImportResourceState to complete successfully */ requiredForImport: boolean; /** * optional_for_import when enabled signifies that this attribute is not * required for ImportResourceState, because it can be supplied by the * provider. It is still possible to supply this attribute during import. */ optionalForImport: boolean; /** description is a human-readable description of the attribute in Markdown */ description: string; } export interface ResourceIdentityData { /** * identity_data is the resource identity data for the given definition. It should * be decoded using the identity schema. * * This data is considered permanent for the identity version and suitable for * longer-term storage. */ identityData: DynamicValue | undefined; } /** ActionSchema defines the schema for an action that can be invoked by Terraform. */ export interface ActionSchema { /** of the action itself */ schema: Schema | undefined; } /** Schema is the configuration schema for a Resource or Provider. */ export interface Schema { /** * The version of the schema. * Schemas are versioned, so that providers can upgrade a saved resource * state when the schema is changed. */ version: Long; /** Block is the top level configuration block for this schema. */ block: Schema_Block | undefined; } export interface Schema_Block { version: Long; attributes: Schema_Attribute[]; blockTypes: Schema_NestedBlock[]; description: string; descriptionKind: StringKind; deprecated: boolean; deprecationMessage: string; computed: boolean; } export interface Schema_Attribute { name: string; type: Uint8Array; nestedType: Schema_Object | undefined; description: string; required: boolean; optional: boolean; computed: boolean; sensitive: boolean; descriptionKind: StringKind; deprecated: boolean; writeOnly: boolean; deprecationMessage: string; } export interface Schema_NestedBlock { typeName: string; block: Schema_Block | undefined; nesting: Schema_NestedBlock_NestingMode; minItems: Long; maxItems: Long; } export declare enum Schema_NestedBlock_NestingMode { INVALID = 0, SINGLE = 1, LIST = 2, SET = 3, MAP = 4, GROUP = 5, UNRECOGNIZED = -1 } export declare function schema_NestedBlock_NestingModeFromJSON(object: any): Schema_NestedBlock_NestingMode; export declare function schema_NestedBlock_NestingModeToJSON(object: Schema_NestedBlock_NestingMode): string; export interface Schema_Object { attributes: Schema_Attribute[]; nesting: Schema_Object_NestingMode; /** * MinItems and MaxItems were never used in the protocol, and have no * effect on validation. * * @deprecated */ minItems: Long; /** @deprecated */ maxItems: Long; } export declare enum Schema_Object_NestingMode { INVALID = 0, SINGLE = 1, LIST = 2, SET = 3, MAP = 4, UNRECOGNIZED = -1 } export declare function schema_Object_NestingModeFromJSON(object: any): Schema_Object_NestingMode; export declare function schema_Object_NestingModeToJSON(object: Schema_Object_NestingMode): string; export interface FunctionMessage { /** parameters is the ordered list of positional function parameters. */ parameters: Function_Parameter[]; /** * variadic_parameter is an optional final parameter which accepts * zero or more argument values, in which Terraform will send an * ordered list of the parameter type. */ variadicParameter: Function_Parameter | undefined; /** Return is the function return parameter. */ return: Function_Return | undefined; /** summary is the human-readable shortened documentation for the function. */ summary: string; /** description is human-readable documentation for the function. */ description: string; /** description_kind is the formatting of the description. */ descriptionKind: StringKind; /** * deprecation_message is human-readable documentation if the * function is deprecated. */ deprecationMessage: string; } export interface Function_Parameter { /** name is the human-readable display name for the parameter. */ name: string; /** type is the type constraint for the parameter. */ type: Uint8Array; /** * allow_null_value when enabled denotes that a null argument value can * be passed to the provider. When disabled, Terraform returns an error * if the argument value is null. */ allowNullValue: boolean; /** * allow_unknown_values when enabled denotes that only wholly known * argument values will be passed to the provider. When disabled, * Terraform skips the function call entirely and assumes an unknown * value result from the function. */ allowUnknownValues: boolean; /** description is human-readable documentation for the parameter. */ description: string; /** description_kind is the formatting of the description. */ descriptionKind: StringKind; } export interface Function_Return { /** type is the type constraint for the function result. */ type: Uint8Array; } /** * ServerCapabilities allows providers to communicate extra information * regarding supported protocol features. This is used to indicate * availability of certain forward-compatible changes which may be optional * in a major protocol version, but cannot be tested for directly. */ export interface ServerCapabilities { /** * The plan_destroy capability signals that a provider expects a call * to PlanResourceChange when a resource is going to be destroyed. */ planDestroy: boolean; /** * The get_provider_schema_optional capability indicates that this * provider does not require calling GetProviderSchema to operate * normally, and the caller can used a cached copy of the provider's * schema. */ getProviderSchemaOptional: boolean; /** * The move_resource_state capability signals that a provider supports the * MoveResourceState RPC. */ moveResourceState: boolean; /** * The generate_resource_config capability signals that a provider supports * GenerateResourceConfig. */ generateResourceConfig: boolean; } /** * ClientCapabilities allows Terraform to publish information regarding * supported protocol features. This is used to indicate availability of * certain forward-compatible changes which may be optional in a major * protocol version, but cannot be tested for directly. */ export interface ClientCapabilities { /** * The deferral_allowed capability signals that the client is able to * handle deferred responses from the provider. */ deferralAllowed: boolean; /** * The write_only_attributes_allowed capability signals that the client * is able to handle write_only attributes for managed resources. */ writeOnlyAttributesAllowed: boolean; /** * store_planned_private indicates that the client will store the private data * returned with an initial plan, and send it back to the provider as * PlannedPrivate data in a subsequent plan request. */ storePlannedPrivate: boolean; /** * computed_blocks_allowed indicates that the client can handle optionally * computed nested block values in resources. Because older versions of * Terraform without this capability will ignore the computed flag in the * schema, it is up to the provider to return an appropriate diagnostic when * a resource requiring the computed behavior is used. */ computedBlocksAllowed: boolean; } /** Deferred is a message that indicates that change is deferred for a reason. */ export interface Deferred { /** reason is the reason for deferring the change. */ reason: Deferred_Reason; } /** Reason is the reason for deferring the change. */ export declare enum Deferred_Reason { /** UNKNOWN - UNKNOWN is the default value, and should not be used. */ UNKNOWN = 0, /** * RESOURCE_CONFIG_UNKNOWN - RESOURCE_CONFIG_UNKNOWN is used when the config is partially unknown and the real * values need to be known before the change can be planned. */ RESOURCE_CONFIG_UNKNOWN = 1, /** * PROVIDER_CONFIG_UNKNOWN - PROVIDER_CONFIG_UNKNOWN is used when parts of the provider configuration * are unknown, e.g. the provider configuration is only known after the apply is done. */ PROVIDER_CONFIG_UNKNOWN = 2, /** ABSENT_PREREQ - ABSENT_PREREQ is used when a hard dependency has not been satisfied. */ ABSENT_PREREQ = 3, UNRECOGNIZED = -1 } export declare function deferred_ReasonFromJSON(object: any): Deferred_Reason; export declare function deferred_ReasonToJSON(object: Deferred_Reason): string; export interface GetMetadata { } export interface GetMetadata_Request { } export interface GetMetadata_Response { serverCapabilities: ServerCapabilities | undefined; diagnostics: Diagnostic[]; dataSources: GetMetadata_DataSourceMetadata[]; resources: GetMetadata_ResourceMetadata[]; /** functions returns metadata for any functions. */ functions: GetMetadata_FunctionMetadata[]; ephemeralResources: GetMetadata_EphemeralMetadata[]; listResources: GetMetadata_ListResourceMetadata[]; stateStores: GetMetadata_StateStoreMetadata[]; actions: GetMetadata_ActionMetadata[]; } export interface GetMetadata_EphemeralMetadata { typeName: string; } export interface GetMetadata_FunctionMetadata { /** name is the function name. */ name: string; } export interface GetMetadata_DataSourceMetadata { typeName: string; } export interface GetMetadata_ResourceMetadata { typeName: string; } export interface GetMetadata_ListResourceMetadata { typeName: string; } export interface GetMetadata_StateStoreMetadata { typeName: string; } export interface GetMetadata_ActionMetadata { typeName: string; } export interface GetProviderSchema { } export interface GetProviderSchema_Request { } export interface GetProviderSchema_Response { provider: Schema | undefined; resourceSchemas: { [key: string]: Schema; }; dataSourceSchemas: { [key: string]: Schema; }; functions: { [key: string]: FunctionMessage; }; ephemeralResourceSchemas: { [key: string]: Schema; }; listResourceSchemas: { [key: string]: Schema; }; stateStoreSchemas: { [key: string]: Schema; }; actionSchemas: { [key: string]: ActionSchema; }; diagnostics: Diagnostic[]; providerMeta: Schema | undefined; serverCapabilities: ServerCapabilities | undefined; } export interface GetProviderSchema_Response_ResourceSchemasEntry { key: string; value: Schema | undefined; } export interface GetProviderSchema_Response_DataSourceSchemasEntry { key: string; value: Schema | undefined; } export interface GetProviderSchema_Response_FunctionsEntry { key: string; value: FunctionMessage | undefined; } export interface GetProviderSchema_Response_EphemeralResourceSchemasEntry { key: string; value: Schema | undefined; } export interface GetProviderSchema_Response_ListResourceSchemasEntry { key: string; value: Schema | undefined; } export interface GetProviderSchema_Response_StateStoreSchemasEntry { key: string; value: Schema | undefined; } export interface GetProviderSchema_Response_ActionSchemasEntry { key: string; value: ActionSchema | undefined; } export interface ValidateProviderConfig { } export interface ValidateProviderConfig_Request { config: DynamicValue | undefined; } export interface ValidateProviderConfig_Response { diagnostics: Diagnostic[]; } export interface UpgradeResourceState { } /** * Request is the message that is sent to the provider during the * UpgradeResourceState RPC. * * This message intentionally does not include configuration data as any * configuration-based or configuration-conditional changes should occur * during the PlanResourceChange RPC. Additionally, the configuration is * not guaranteed to exist (in the case of resource destruction), be wholly * known, nor match the given prior state, which could lead to unexpected * provider behaviors for practitioners. */ export interface UpgradeResourceState_Request { typeName: string; /** version is the schema_version number recorded in the state file */ version: Long; /** * raw_state is the raw states as stored for the resource. Core does * not have access to the schema of prior_version, so it's the * provider's responsibility to interpret this value using the * appropriate older schema. The raw_state will be the json encoded * state, or a legacy flat-mapped format. */ rawState: RawState | undefined; } export interface UpgradeResourceState_Response { /** * new_state is a msgpack-encoded data structure that, when interpreted with * the _current_ schema for this resource type, is functionally equivalent to * that which was given in prior_state_raw. */ upgradedState: DynamicValue | undefined; /** * diagnostics describes any errors encountered during migration that could not * be safely resolved, and warnings about any possibly-risky assumptions made * in the upgrade process. */ diagnostics: Diagnostic[]; } export interface GetResourceIdentitySchemas { } export interface GetResourceIdentitySchemas_Request { } export interface GetResourceIdentitySchemas_Response { /** identity_schemas is a mapping of resource type names to their identity schemas. */ identitySchemas: { [key: string]: ResourceIdentitySchema; }; /** diagnostics is the collection of warning and error diagnostics for this request. */ diagnostics: Diagnostic[]; } export interface GetResourceIdentitySchemas_Response_IdentitySchemasEntry { key: string; value: ResourceIdentitySchema | undefined; } export interface UpgradeResourceIdentity { } export interface UpgradeResourceIdentity_Request { /** type_name is the managed resource type name */ typeName: string; /** version is the version of the resource identity data to upgrade */ version: Long; /** * raw_identity is the raw identity as stored for the resource. Core does * not have access to the identity schema of prior_version, so it's the * provider's responsibility to interpret this value using the * appropriate older schema. The raw_identity will be json encoded. */ rawIdentity: RawState | undefined; } export interface UpgradeResourceIdentity_Response { /** upgraded_identity returns the upgraded resource identity data */ upgradedIdentity: ResourceIdentityData | undefined; /** diagnostics is the collection of warning and error diagnostics for this request */ diagnostics: Diagnostic[]; } export interface ValidateResourceConfig { } export interface ValidateResourceConfig_Request { typeName: string; config: DynamicValue | undefined; clientCapabilities: ClientCapabilities | undefined; } export interface ValidateResourceConfig_Response { diagnostics: Diagnostic[]; } export interface ValidateDataResourceConfig { } export interface ValidateDataResourceConfig_Request { typeName: string; config: DynamicValue | undefined; } export interface ValidateDataResourceConfig_Response { diagnostics: Diagnostic[]; } export interface ValidateEphemeralResourceConfig { } export interface ValidateEphemeralResourceConfig_Request { typeName: string; config: DynamicValue | undefined; } export interface ValidateEphemeralResourceConfig_Response { diagnostics: Diagnostic[]; } export interface ConfigureProvider { } export interface ConfigureProvider_Request { terraformVersion: string; config: DynamicValue | undefined; clientCapabilities: ClientCapabilities | undefined; } export interface ConfigureProvider_Response { diagnostics: Diagnostic[]; } export interface ReadResource { } /** * Request is the message that is sent to the provider during the * ReadResource RPC. * * This message intentionally does not include configuration data as any * configuration-based or configuration-conditional changes should occur * during the PlanResourceChange RPC. Additionally, the configuration is * not guaranteed to be wholly known nor match the given prior state, which * could lead to unexpected provider behaviors for practitioners. */ export interface ReadResource_Request { typeName: string; currentState: DynamicValue | undefined; private: Uint8Array; providerMeta: DynamicValue | undefined; clientCapabilities: ClientCapabilities | undefined; currentIdentity: ResourceIdentityData | undefined; } export interface ReadResource_Response { newState: DynamicValue | undefined; diagnostics: Diagnostic[]; private: Uint8Array; /** * deferred is set if the provider is deferring the change. If set the caller * needs to handle the deferral. */ deferred: Deferred | undefined; newIdentity: ResourceIdentityData | undefined; } export interface PlanResourceChange { } export interface PlanResourceChange_Request { typeName: string; priorState: DynamicValue | undefined; proposedNewState: DynamicValue | undefined; config: DynamicValue | undefined; priorPrivate: Uint8Array; providerMeta: DynamicValue | undefined; clientCapabilities: ClientCapabilities | undefined; priorIdentity: ResourceIdentityData | undefined; plannedPrivate: Uint8Array; } export interface PlanResourceChange_Response { plannedState: DynamicValue | undefined; requiresReplace: AttributePath[]; plannedPrivate: Uint8Array; diagnostics: Diagnostic[]; /** * This may be set only by the helper/schema "SDK" in the main Terraform * repository, to request that Terraform Core >=0.12 permit additional * inconsistencies that can result from the legacy SDK type system * and its imprecise mapping to the >=0.12 type system. * The change in behavior implied by this flag makes sense only for the * specific details of the legacy SDK type system, and are not a general * mechanism to avoid proper type handling in providers. * * ==== DO NOT USE THIS ==== * ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ==== * ==== DO NOT USE THIS ==== */ legacyTypeSystem: boolean; /** * deferred is set if the provider is deferring the change. If set the caller * needs to handle the deferral. */ deferred: Deferred | undefined; plannedIdentity: ResourceIdentityData | undefined; } export interface ApplyResourceChange { } export interface ApplyResourceChange_Request { typeName: string; priorState: DynamicValue | undefined; plannedState: DynamicValue | undefined; config: DynamicValue | undefined; plannedPrivate: Uint8Array; providerMeta: DynamicValue | undefined; plannedIdentity: ResourceIdentityData | undefined; } export interface ApplyResourceChange_Response { newState: DynamicValue | undefined; private: Uint8Array; diagnostics: Diagnostic[]; /** * This may be set only by the helper/schema "SDK" in the main Terraform * repository, to request that Terraform Core >=0.12 permit additional * inconsistencies that can result from the legacy SDK type system * and its imprecise mapping to the >=0.12 type system. * The change in behavior implied by this flag makes sense only for the * specific details of the legacy SDK type system, and are not a general * mechanism to avoid proper type handling in providers. * * ==== DO NOT USE THIS ==== * ==== THIS MUST BE LEFT UNSET IN ALL OTHER SDKS ==== * ==== DO NOT USE THIS ==== */ legacyTypeSystem: boolean; newIdentity: ResourceIdentityData | undefined; } export interface ImportResourceState { } export interface ImportResourceState_Request { typeName: string; id: string; clientCapabilities: ClientCapabilities | undefined; identity: ResourceIdentityData | undefined; } export interface ImportResourceState_ImportedResource { typeName: string; state: DynamicValue | undefined; private: Uint8Array; identity: ResourceIdentityData | undefined; } export interface ImportResourceState_Response { importedResources: ImportResourceState_ImportedResource[]; diagnostics: Diagnostic[]; /** * deferred is set if the provider is deferring the change. If set the caller * needs to handle the deferral. */ deferred: Deferred | undefined; } export interface GenerateResourceConfig { } export interface GenerateResourceConfig_Request { typeName: string; state: DynamicValue | undefined; } export interface GenerateResourceConfig_Response { /** config is the provided state modified such that it represents a valid resource configuration value. */ config: DynamicValue | undefined; diagnostics: Diagnostic[]; } export interface MoveResourceState { } export interface MoveResourceState_Request { /** The address of the provider the resource is being moved from. */ sourceProviderAddress: string; /** The resource type that the resource is being moved from. */ sourceTypeName: string; /** * The schema version of the resource type that the resource is being * moved from. */ sourceSchemaVersion: Long; /** * The raw state of the resource being moved. Only the json field is * populated, as there should be no legacy providers using the flatmap * format that support newly introduced RPCs. */ sourceState: RawState | undefined; /** The resource type that the resource is being moved to. */ targetTypeName: string; /** The private state of the resource being moved. */ sourcePrivate: Uint8Array; /** * The raw identity of the resource being moved. Only the json field is * populated, as there should be no legacy providers using the flatmap * format that support newly introduced RPCs. */ sourceIdentity: RawState | undefined; /** * The identity schema version of the resource type that the resource * is being moved from. */ sourceIdentitySchemaVersion: Long; } export interface MoveResourceState_Response { /** The state of the resource after it has been moved. */ targetState: DynamicValue | undefined; /** Any diagnostics that occurred during the move. */ diagnostics: Diagnostic[]; /** The private state of the resource after it has been moved. */ targetPrivate: Uint8Array; targetIdentity: ResourceIdentityData | undefined; } export interface ReadDataSource { } export interface ReadDataSource_Request { typeName: string; config: DynamicValue | undefined; providerMeta: DynamicValue | undefined; clientCapabilities: ClientCapabilities | undefined; } export interface ReadDataSource_Response { state: DynamicValue | undefined; diagnostics: Diagnostic[]; /** * deferred is set if the provider is deferring the change. If set the caller * needs to handle the deferral. */ deferred: Deferred | undefined; } export interface OpenEphemeralResource { } export interface OpenEphemeralResource_Request { typeName: string; config: DynamicValue | undefined; clientCapabilities: ClientCapabilities | undefined; } export interface OpenEphemeralResource_Response { diagnostics: Diagnostic[]; renewAt?: Timestamp | undefined; result: DynamicValue | undefined; private?: Uint8Array | undefined; deferred: Deferred | undefined; } export interface RenewEphemeralResource { } export interface RenewEphemeralResource_Request { typeName: string; private?: Uint8Array | undefined; } export interface RenewEphemeralResource_Response { diagnostics: Diagnostic[]; renewAt?: Timestamp | undefined; private?: Uint8Array | undefined; } export interface CloseEphemeralResource { } export interface CloseEphemeralResource_Request { typeName: string; private?: Uint8Array | undefined; } export interface CloseEphemeralResource_Response { diagnostics: Diagnostic[]; } export interface GetFunctions { } export interface GetFunctions_Request { } export interface GetFunctions_Response { /** functions is a mapping of function names to definitions. */ functions: { [key: string]: FunctionMessage; }; /** diagnostics is any warnings or errors. */ diagnostics: Diagnostic[]; } export interface GetFunctions_Response_FunctionsEntry { key: string; value: FunctionMessage | undefined; } export interface CallFunction { } export interface CallFunction_Request { name: string; arguments: DynamicValue[]; } export interface CallFunction_Response { result: DynamicValue | undefined; error: FunctionError | undefined; } export interface ListResource { } export interface ListResource_Request { /** type_name is the list resource type name. */ typeName: string; /** configuration is the list ConfigSchema-based configuration data. */ config: DynamicValue | undefined; /** * when include_resource_object is set to true, the provider should * include the full resource object for each result */ includeResourceObject: boolean; /** * The maximum number of results that Terraform is expecting. * The stream will stop, once this limit is reached. */ limit: Long; } export interface ListResource_Event { /** identity is the resource identity data of the resource instance. */ identity: ResourceIdentityData | undefined; /** display_name can be displayed in a UI to make it easier for humans to identify a resource */ displayName: string; /** optional resource object which can be useful when combining list blocks in configuration */ resourceObject?: DynamicValue | undefined; /** A warning or error diagnostics for this event */ diagnostic: Diagnostic[]; } export interface ValidateListResourceConfig { } export interface ValidateListResourceConfig_Request { typeName: string; config: DynamicValue | undefined; includeResourceObject: DynamicValue | undefined; limit: DynamicValue | undefined; } export interface ValidateListResourceConfig_Response { diagnostics: Diagnostic[]; } export interface ValidateStateStore { } export interface ValidateStateStore_Request { typeName: string; config: DynamicValue | undefined; } export interface ValidateStateStore_Response { diagnostics: Diagnostic[]; } export interface ConfigureStateStore { } export interface ConfigureStateStore_Request { typeName: string; config: DynamicValue | undefined; capabilities: StateStoreClientCapabilities | undefined; } export interface ConfigureStateStore_Response { diagnostics: Diagnostic[]; capabilities: StateStoreServerCapabilities | undefined; } export interface StateStoreClientCapabilities { /** suggested chunk size by Core */ chunkSize: Long; } export interface StateStoreServerCapabilities { /** chosen chunk size by plugin */ chunkSize: Long; } export interface ReadStateBytes { } export interface ReadStateBytes_Request { typeName: string; stateId: string; } export interface ReadStateBytes_Response { bytes: Uint8Array; /** total_length is the overall size of all of the state byte chunks that will be received */ totalLength: Long; range: StateRange | undefined; diagnostics: Diagnostic[]; } export interface WriteStateBytes { } export interface WriteStateBytes_RequestChunk { /** meta is sent with the first chunk only */ meta?: RequestChunkMeta | undefined; bytes: Uint8Array; /** total_length is the overall size of all of the state byte chunks that will be sent. */ totalLength: Long; range: StateRange | undefined; } export interface WriteStateBytes_Response { diagnostics: Diagnostic[]; } export interface RequestChunkMeta { typeName: string; stateId: string; } export interface StateRange { /** * start is the starting byte index for a chunk of state byte data. * This index is in relation to the entire byte array that will be sent or received. */ start: Long; /** * end is the ending byte index for a chunk of state byte data. * This index is in relation to the entire byte array that will be sent or received. */ end: Long; } export interface LockState { } export interface LockState_Request { typeName: string; stateId: string; /** operation represents an ongoing operation due to which lock is held (e.g. refresh, plan, apply) */ operation: string; } export interface LockState_Response { lockId: string; diagnostics: Diagnostic[]; } export interface UnlockState { } export interface UnlockState_Request { typeName: string; stateId: string; lockId: string; } export interface UnlockState_Response { diagnostics: Diagnostic[]; } export interface GetStates { } export interface GetStates_Request { typeName: string; } export interface GetStates_Response { stateId: string[]; diagnostics: Diagnostic[]; } export interface DeleteState { } export interface DeleteState_Request { typeName: string; stateId: string; } export interface DeleteState_Response { diagnostics: Diagnostic[]; } export interface PlanAction { } export interface PlanAction_Request { actionType: string; /** config of the action, based on the schema of the actual action */ config: DynamicValue | undefined; /** metadata */ clientCapabilities: ClientCapabilities | undefined; } export interface PlanAction_Response { diagnostics: Diagnostic[]; /** metadata */ deferred: Deferred | undefined; } export interface InvokeAction { } export interface InvokeAction_Request { actionType: string; /** response from the plan */ config: DynamicValue | undefined; /** metadata */ clientCapabilities: ClientCapabilities | undefined; } export interface InvokeAction_Event { progress?: InvokeAction_Event_Progress | undefined; completed?: InvokeAction_Event_Completed | undefined; } export interface InvokeAction_Event_Progress { /** message to be printed in the console / HCPT */ message: string; } export interface InvokeAction_Event_Completed { diagnostics: Diagnostic[]; } export interface ValidateActionConfig { } export interface ValidateActionConfig_Request { typeName: string; config: DynamicValue | undefined; } export interface ValidateActionConfig_Response { diagnostics: Diagnostic[]; } export declare const DynamicValue: MessageFns; export declare const Diagnostic: MessageFns; export declare const FunctionError: MessageFns; export declare const AttributePath: MessageFns; export declare const AttributePath_Step: MessageFns; export declare const StopProvider: MessageFns; export declare const StopProvider_Request: MessageFns; export declare const StopProvider_Response: MessageFns; export declare const RawState: MessageFns; export declare const RawState_FlatmapEntry: MessageFns; export declare const ResourceIdentitySchema: MessageFns; export declare const ResourceIdentitySchema_IdentityAttribute: MessageFns; export declare const ResourceIdentityData: MessageFns; export declare const ActionSchema: MessageFns; export declare const Schema: MessageFns; export declare const Schema_Block: MessageFns; export declare const Schema_Attribute: MessageFns; export declare const Schema_NestedBlock: MessageFns; export declare const Schema_Object: MessageFns; export declare const FunctionMessage: MessageFns; export declare const Function_Parameter: MessageFns; export declare const Function_Return: MessageFns; export declare const ServerCapabilities: MessageFns; export declare const ClientCapabilities: MessageFns; export declare const Deferred: MessageFns; export declare const GetMetadata: MessageFns; export declare const GetMetadata_Request: MessageFns; export declare const GetMetadata_Response: MessageFns; export declare const GetMetadata_EphemeralMetadata: MessageFns; export declare const GetMetadata_FunctionMetadata: MessageFns; export declare const GetMetadata_DataSourceMetadata: MessageFns; export declare const GetMetadata_ResourceMetadata: MessageFns; export declare const GetMetadata_ListResourceMetadata: MessageFns; export declare const GetMetadata_StateStoreMetadata: MessageFns; export declare const GetMetadata_ActionMetadata: MessageFns; export declare const GetProviderSchema: MessageFns; export declare const GetProviderSchema_Request: MessageFns; export declare const GetProviderSchema_Response: MessageFns; export declare const GetProviderSchema_Response_ResourceSchemasEntry: MessageFns; export declare const GetProviderSchema_Response_DataSourceSchemasEntry: MessageFns; export declare const GetProviderSchema_Response_FunctionsEntry: MessageFns; export declare const GetProviderSchema_Response_EphemeralResourceSchemasEntry: MessageFns; export declare const GetProviderSchema_Response_ListResourceSchemasEntry: MessageFns; export declare const GetProviderSchema_Response_StateStoreSchemasEntry: MessageFns; export declare const GetProviderSchema_Response_ActionSchemasEntry: MessageFns; export declare const ValidateProviderConfig: MessageFns; export declare const ValidateProviderConfig_Request: MessageFns; export declare const ValidateProviderConfig_Response: MessageFns; export declare const UpgradeResourceState: MessageFns; export declare const UpgradeResourceState_Request: MessageFns; export declare const UpgradeResourceState_Response: MessageFns; export declare const GetResourceIdentitySchemas: MessageFns; export declare const GetResourceIdentitySchemas_Request: MessageFns; export declare const GetResourceIdentitySchemas_Response: MessageFns; export declare const GetResourceIdentitySchemas_Response_IdentitySchemasEntry: MessageFns; export declare const UpgradeResourceIdentity: MessageFns; export declare const UpgradeResourceIdentity_Request: MessageFns; export declare const UpgradeResourceIdentity_Response: MessageFns; export declare const ValidateResourceConfig: MessageFns; export declare const ValidateResourceConfig_Request: MessageFns; export declare const ValidateResourceConfig_Response: MessageFns; export declare const ValidateDataResourceConfig: MessageFns; export declare const ValidateDataResourceConfig_Request: MessageFns; export declare const ValidateDataResourceConfig_Response: MessageFns; export declare const ValidateEphemeralResourceConfig: MessageFns; export declare const ValidateEphemeralResourceConfig_Request: MessageFns; export declare const ValidateEphemeralResourceConfig_Response: MessageFns; export declare const ConfigureProvider: MessageFns; export declare const ConfigureProvider_Request: MessageFns; export declare const ConfigureProvider_Response: MessageFns; export declare const ReadResource: MessageFns; export declare const ReadResource_Request: MessageFns; export declare const ReadResource_Response: MessageFns; export declare const PlanResourceChange: MessageFns; export declare const PlanResourceChange_Request: MessageFns; export declare const PlanResourceChange_Response: MessageFns; export declare const ApplyResourceChange: MessageFns; export declare const ApplyResourceChange_Request: MessageFns; export declare const ApplyResourceChange_Response: MessageFns; export declare const ImportResourceState: MessageFns; export declare const ImportResourceState_Request: MessageFns; export declare const ImportResourceState_ImportedResource: MessageFns; export declare const ImportResourceState_Response: MessageFns; export declare const GenerateResourceConfig: MessageFns; export declare const GenerateResourceConfig_Request: MessageFns; export declare const GenerateResourceConfig_Response: MessageFns; export declare const MoveResourceState: MessageFns; export declare const MoveResourceState_Request: MessageFns; export declare const MoveResourceState_Response: MessageFns; export declare const ReadDataSource: MessageFns; export declare const ReadDataSource_Request: MessageFns; export declare const ReadDataSource_Response: MessageFns; export declare const OpenEphemeralResource: MessageFns; export declare const OpenEphemeralResource_Request: MessageFns; export declare const OpenEphemeralResource_Response: MessageFns; export declare const RenewEphemeralResource: MessageFns; export declare const RenewEphemeralResource_Request: MessageFns; export declare const RenewEphemeralResource_Response: MessageFns; export declare const CloseEphemeralResource: MessageFns; export declare const CloseEphemeralResource_Request: MessageFns; export declare const CloseEphemeralResource_Response: MessageFns; export declare const GetFunctions: MessageFns; export declare const GetFunctions_Request: MessageFns; export declare const GetFunctions_Response: MessageFns; export declare const GetFunctions_Response_FunctionsEntry: MessageFns; export declare const CallFunction: MessageFns; export declare const CallFunction_Request: MessageFns; export declare const CallFunction_Response: MessageFns; export declare const ListResource: MessageFns; export declare const ListResource_Request: MessageFns; export declare const ListResource_Event: MessageFns; export declare const ValidateListResourceConfig: MessageFns; export declare const ValidateListResourceConfig_Request: MessageFns; export declare const ValidateListResourceConfig_Response: MessageFns; export declare const ValidateStateStore: MessageFns; export declare const ValidateStateStore_Request: MessageFns; export declare const ValidateStateStore_Response: MessageFns; export declare const ConfigureStateStore: MessageFns; export declare const ConfigureStateStore_Request: MessageFns; export declare const ConfigureStateStore_Response: MessageFns; export declare const StateStoreClientCapabilities: MessageFns; export declare const StateStoreServerCapabilities: MessageFns; export declare const ReadStateBytes: MessageFns; export declare const ReadStateBytes_Request: MessageFns; export declare const ReadStateBytes_Response: MessageFns; export declare const WriteStateBytes: MessageFns; export declare const WriteStateBytes_RequestChunk: MessageFns; export declare const WriteStateBytes_Response: MessageFns; export declare const RequestChunkMeta: MessageFns; export declare const StateRange: MessageFns; export declare const LockState: MessageFns; export declare const LockState_Request: MessageFns; export declare const LockState_Response: MessageFns; export declare const UnlockState: MessageFns; export declare const UnlockState_Request: MessageFns; export declare const UnlockState_Response: MessageFns; export declare const GetStates: MessageFns; export declare const GetStates_Request: MessageFns; export declare const GetStates_Response: MessageFns; export declare const DeleteState: MessageFns; export declare const DeleteState_Request: MessageFns; export declare const DeleteState_Response: MessageFns; export declare const PlanAction: MessageFns; export declare const PlanAction_Request: MessageFns; export declare const PlanAction_Response: MessageFns; export declare const InvokeAction: MessageFns; export declare const InvokeAction_Request: MessageFns; export declare const InvokeAction_Event: MessageFns; export declare const InvokeAction_Event_Progress: MessageFns; export declare const InvokeAction_Event_Completed: MessageFns; export declare const ValidateActionConfig: MessageFns; export declare const ValidateActionConfig_Request: MessageFns; export declare const ValidateActionConfig_Response: MessageFns; export interface ProviderServiceImplementation { /** * GetMetadata returns upfront information about server capabilities and * supported resource types without requiring the server to instantiate all * schema information, which may be memory intensive. * This method is CURRENTLY UNUSED and it serves mostly for convenience * of code generation inside of terraform-plugin-mux. */ getMetadata(request: GetMetadata_Request, context: CallContext & CallContextExt): Promise>; /** * GetSchema returns schema information for the provider, data resources, * and managed resources. */ getProviderSchema(request: GetProviderSchema_Request, context: CallContext & CallContextExt): Promise>; validateProviderConfig(request: ValidateProviderConfig_Request, context: CallContext & CallContextExt): Promise>; validateResourceConfig(request: ValidateResourceConfig_Request, context: CallContext & CallContextExt): Promise>; validateDataResourceConfig(request: ValidateDataResourceConfig_Request, context: CallContext & CallContextExt): Promise>; upgradeResourceState(request: UpgradeResourceState_Request, context: CallContext & CallContextExt): Promise>; /** * GetResourceIdentitySchemas returns the identity schemas for all managed * resources. */ getResourceIdentitySchemas(request: GetResourceIdentitySchemas_Request, context: CallContext & CallContextExt): Promise>; /** * UpgradeResourceIdentityData should return the upgraded resource identity * data for a managed resource type. */ upgradeResourceIdentity(request: UpgradeResourceIdentity_Request, context: CallContext & CallContextExt): Promise>; /** ////// One-time initialization, called before other functions below */ configureProvider(request: ConfigureProvider_Request, context: CallContext & CallContextExt): Promise>; /** ////// Managed Resource Lifecycle */ readResource(request: ReadResource_Request, context: CallContext & CallContextExt): Promise>; planResourceChange(request: PlanResourceChange_Request, context: CallContext & CallContextExt): Promise>; applyResourceChange(request: ApplyResourceChange_Request, context: CallContext & CallContextExt): Promise>; importResourceState(request: ImportResourceState_Request, context: CallContext & CallContextExt): Promise>; moveResourceState(request: MoveResourceState_Request, context: CallContext & CallContextExt): Promise>; readDataSource(request: ReadDataSource_Request, context: CallContext & CallContextExt): Promise>; generateResourceConfig(request: GenerateResourceConfig_Request, context: CallContext & CallContextExt): Promise>; /** ////// Ephemeral Resource Lifecycle */ validateEphemeralResourceConfig(request: ValidateEphemeralResourceConfig_Request, context: CallContext & CallContextExt): Promise>; openEphemeralResource(request: OpenEphemeralResource_Request, context: CallContext & CallContextExt): Promise>; renewEphemeralResource(request: RenewEphemeralResource_Request, context: CallContext & CallContextExt): Promise>; closeEphemeralResource(request: CloseEphemeralResource_Request, context: CallContext & CallContextExt): Promise>; /** ///// List */ listResource(request: ListResource_Request, context: CallContext & CallContextExt): ServerStreamingMethodResult>; validateListResourceConfig(request: ValidateListResourceConfig_Request, context: CallContext & CallContextExt): Promise>; /** GetFunctions returns the definitions of all functions. */ getFunctions(request: GetFunctions_Request, context: CallContext & CallContextExt): Promise>; /** ////// Provider-contributed Functions */ callFunction(request: CallFunction_Request, context: CallContext & CallContextExt): Promise>; /** ValidateStateStoreConfig performs configuration validation */ validateStateStoreConfig(request: ValidateStateStore_Request, context: CallContext & CallContextExt): Promise>; /** ConfigureStateStore configures the state store, such as S3 connection in the context of already configured provider */ configureStateStore(request: ConfigureStateStore_Request, context: CallContext & CallContextExt): Promise>; /** ReadStateBytes streams byte chunks of a given state file from a state store */ readStateBytes(request: ReadStateBytes_Request, context: CallContext & CallContextExt): ServerStreamingMethodResult>; /** WriteStateBytes streams byte chunks of a given state file into a state store */ writeStateBytes(request: AsyncIterable, context: CallContext & CallContextExt): Promise>; /** LockState locks a given state (i.e. CE workspace) */ lockState(request: LockState_Request, context: CallContext & CallContextExt): Promise>; /** UnlockState unlocks a given state (i.e. CE workspace) */ unlockState(request: UnlockState_Request, context: CallContext & CallContextExt): Promise>; /** GetStates returns a list of all states (i.e. CE workspaces) managed by a given state store */ getStates(request: GetStates_Request, context: CallContext & CallContextExt): Promise>; /** DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace) */ deleteState(request: DeleteState_Request, context: CallContext & CallContextExt): Promise>; /** ////// Actions */ planAction(request: PlanAction_Request, context: CallContext & CallContextExt): Promise>; invokeAction(request: InvokeAction_Request, context: CallContext & CallContextExt): ServerStreamingMethodResult>; validateActionConfig(request: ValidateActionConfig_Request, context: CallContext & CallContextExt): Promise>; /** ////// Graceful Shutdown */ stopProvider(request: StopProvider_Request, context: CallContext & CallContextExt): Promise>; } export interface ProviderClient { /** * GetMetadata returns upfront information about server capabilities and * supported resource types without requiring the server to instantiate all * schema information, which may be memory intensive. * This method is CURRENTLY UNUSED and it serves mostly for convenience * of code generation inside of terraform-plugin-mux. */ getMetadata(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * GetSchema returns schema information for the provider, data resources, * and managed resources. */ getProviderSchema(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; validateProviderConfig(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; validateResourceConfig(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; validateDataResourceConfig(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; upgradeResourceState(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * GetResourceIdentitySchemas returns the identity schemas for all managed * resources. */ getResourceIdentitySchemas(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * UpgradeResourceIdentityData should return the upgraded resource identity * data for a managed resource type. */ upgradeResourceIdentity(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ////// One-time initialization, called before other functions below */ configureProvider(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ////// Managed Resource Lifecycle */ readResource(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; planResourceChange(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; applyResourceChange(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; importResourceState(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; moveResourceState(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; readDataSource(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; generateResourceConfig(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ////// Ephemeral Resource Lifecycle */ validateEphemeralResourceConfig(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; openEphemeralResource(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; renewEphemeralResource(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; closeEphemeralResource(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ///// List */ listResource(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; validateListResourceConfig(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** GetFunctions returns the definitions of all functions. */ getFunctions(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ////// Provider-contributed Functions */ callFunction(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ValidateStateStoreConfig performs configuration validation */ validateStateStoreConfig(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ConfigureStateStore configures the state store, such as S3 connection in the context of already configured provider */ configureStateStore(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ReadStateBytes streams byte chunks of a given state file from a state store */ readStateBytes(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; /** WriteStateBytes streams byte chunks of a given state file into a state store */ writeStateBytes(request: AsyncIterable>, options?: CallOptions & CallOptionsExt): Promise; /** LockState locks a given state (i.e. CE workspace) */ lockState(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** UnlockState unlocks a given state (i.e. CE workspace) */ unlockState(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** GetStates returns a list of all states (i.e. CE workspaces) managed by a given state store */ getStates(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace) */ deleteState(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ////// Actions */ planAction(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; invokeAction(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; validateActionConfig(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** ////// Graceful Shutdown */ stopProvider(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & { [K in Exclude>]: never; }; export type ServerStreamingMethodResult = { [Symbol.asyncIterator](): AsyncIterator; }; export interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create, I>>(base?: I): T; fromPartial, I>>(object: I): T; } export {}; //# sourceMappingURL=tfplugin6.d.ts.map