I'm trying to use this and copied sampleProvider but its giving me error whenever i run the terraform plan/apply please see below:
[21:14:03 INF] Request starting HTTP/2 POST http://unused/tfplugin5.Provider/GetSchema application/grpc -
[21:14:03 INF] Request starting HTTP/2 POST http://unused/plugin.GRPCBroker/StartStream application/grpc -
[21:14:03 INF] Request starting HTTP/2 POST http://unused/plugin.GRPCStdio/StreamStdio application/grpc -
[21:14:03 INF] Executing endpoint 'gRPC - /tfplugin5.Provider/GetSchema'
[21:14:03 INF] Executing endpoint 'gRPC - Unimplemented service'
[21:14:03 INF] Executing endpoint 'gRPC - Unimplemented service'
[21:14:03 INF] Service 'plugin.GRPCStdio' is unimplemented.
[21:14:03 INF] Service 'plugin.GRPCBroker' is unimplemented.
[21:14:03 INF] Executed endpoint 'gRPC - Unimplemented service'
[21:14:03 INF] Executed endpoint 'gRPC - Unimplemented service'
[21:14:04 INF] Request finished HTTP/2 POST http://unused/plugin.GRPCBroker/StartStream application/grpc - - 200 0 application/grpc 59.8361ms
[21:14:04 INF] Request finished HTTP/2 POST http://unused/plugin.GRPCStdio/StreamStdio application/grpc - - 200 0 application/grpc 59.8344ms
[21:14:04 ERR] Error when executing service method 'GetSchema'.
System.NullReferenceException: Object reference not set to an instance of an object.
at TerraformPluginDotNet.Schemas.SchemaBuilder.BuildSchema(Type type)
at TerraformPluginDotNet.ResourceProvider.ResourceRegistry..ctor(ISchemaBuilder schemaBulder, IEnumerable`1 registrations)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ActivatorUtilities.GetService(IServiceProvider sp, Type type, Type requiredBy, Boolean isDefaultParameterRequired)
at lambda_method1(Closure , IServiceProvider , Object[] )
at Grpc.AspNetCore.Server.Internal.DefaultGrpcServiceActivator`1.Create(IServiceProvider serviceProvider)
at Grpc.Shared.Server.UnaryServerMethodInvoker`3.Invoke(HttpContext httpContext, ServerCallContext serverCallContext, TRequest request)
--- End of stack trace from previous location ---
at Grpc.AspNetCore.Server.Internal.CallHandlers.UnaryServerCallHandler`3.HandleCallAsyncCore(HttpContext httpContext, HttpContextServerCallContext serverCallContext)
at Grpc.AspNetCore.Server.Internal.CallHandlers.ServerCallHandlerBase`3.<HandleCallAsync>g__AwaitHandleCall|8_0(HttpContextServerCallContext serverCallContext, Method`2 method, Task handleCall)
[21:14:04 INF] Executed endpoint 'gRPC - /tfplugin5.Provider/GetSchema'
I'm trying to use this and copied sampleProvider but its giving me error whenever i run the terraform plan/apply please see below: