API
@ts-terraform/provider
Provider
Provider
allows for interacting with a Terraform provider using gRPC.
tsexport declare const
createProvider : (binary : string,opts ?:Options | undefined, ) =>Promise <Provider <ProviderConfigType >> export declare functioncodegen (provider :Provider ): string export interfaceOptions { /** If true, the provider's debug messages will be printed on stderr */debug ?: boolean } export interfaceProviderConfigType {providerSchema : objectdataSourceSchemas :Record <string, object>resourceSchemas :Record <string, object>dataSourceStateSchemas :Record <string, object>resourceStateSchemas :Record <string, object> } export declare classProvider <ProviderConfig extendsProviderConfigType =ProviderConfigType > { getproviderSchema ():ObjectType <ObjectProperties > getdataSourceSchemas ():Record <string,ObjectType <ObjectProperties >> getresourceSchemas ():Record <string,ObjectType <ObjectProperties >> getdataSourceStateSchemas ():Record <string,ObjectType <ObjectProperties >> getresourceStateSchemas ():Record <string,ObjectType <ObjectProperties >>getSchema ():Promise <tfplugin5 .GetProviderSchema .Response >applyResourceChange <Name extendsStringKeyOf <ProviderConfig ['resourceStateSchemas']>>(typeName :Name ,priorState :ProviderConfig ['resourceStateSchemas'][Name ],plannedState :ProviderConfig ['resourceStateSchemas'][Name ],options ?: {private ?:Record <string, unknown> }, ):Promise <{newState :ProviderConfig ['resourceStateSchemas'][Name ]private :Record <string, unknown> }>configure (config :ProviderConfig ['providerSchema']):Promise <tfplugin5 .Configure .Response >importResourceState <Name extendsStringKeyOf <ProviderConfig ['resourceStateSchemas']>>(typeName :Name ,id : string, ):Promise < {typeName :Name state :ProviderConfig ['resourceStateSchemas'][Name ]private ?:Record <string, unknown> }[] >planResourceChange <Name extendsStringKeyOf <ProviderConfig ['resourceStateSchemas']>>(typeName :Name ,priorState :ProviderConfig ['resourceStateSchemas'][Name ],proposedNewState :ProviderConfig ['resourceStateSchemas'][Name ],options ?: {private ?:Record <string, unknown> }, ):Promise <{plannedState :ProviderConfig ['resourceStateSchemas'][Name ]plannedPrivate :Record <string, unknown>requiresReplace :tfplugin5 .IAttributePath [] }>readDataSource <Name extendsStringKeyOf <ProviderConfig ['dataSourceSchemas']>>(typeName :Name ,config :ProviderConfig ['dataSourceSchemas'][Name ], ):Promise <ProviderConfig ['dataSourceStateSchemas'][Name ]>readResource <Name extendsStringKeyOf <ProviderConfig ['resourceStateSchemas']>>(typeName :Name ,currentState :ProviderConfig ['resourceStateSchemas'][Name ],options ?: {private ?:Record <string, unknown> }, ):Promise <ProviderConfig ['resourceStateSchemas'][Name ] | undefined>shutdown (signal ?:NodeJS .Signals | number):Promise <boolean>upgradeResourceState <Name extendsStringKeyOf <ProviderConfig ['resourceStateSchemas']>>(typeName :Name ,version : number,state : object, ):Promise <ProviderConfig ['resourceStateSchemas'][Name ]>validateDataSourceConfig <Name extendsStringKeyOf <ProviderConfig ['dataSourceSchemas']>>(typeName :Name ,config : object, ):Promise <tfplugin5 .ValidateDataSourceConfig .Response >validateResourceTypeConfig <Name extendsStringKeyOf <ProviderConfig ['resourceSchemas']>>(typeName :Name ,config : object, ):Promise <tfplugin5 .ValidateResourceTypeConfig .Response > }