pulumi/pulumi · error · Error

ConfigureRequest missing args

Error message

ConfigureRequest missing args

What it means

The dynamic provider's gRPC Configure handler in sdk/nodejs/cmd/dynamic-provider/index.ts reads the args from an incoming provproto.ConfigureRequest via getArgs(). If the request carries no args (null/undefined protobuf field), it throws 'ConfigureRequest missing args'. The provider cannot build its config map (excluding the provider key) without args, so it fails fast. This indicates a malformed or engine-incompatible Configure RPC rather than user configuration being wrong.

Source

Thrown at sdk/nodejs/cmd/dynamic-provider/index.ts:117

    // Ideally we'd type the config as `Record<string, any>`, but since we
    // implement `IResourceProviderServer`, we require the `[method: string`]
    // index signature to satisfy the interface. This is a bit unfortunate and
    // means we can't have a strongly typed `config` property. We'll just use
    // `any` here.
    private config: any;

    cancel(call: any, callback: any): void {
        callback(undefined, new emptyproto.Empty());
    }

    async configure(
        call: grpc.ServerUnaryCall<provproto.ConfigureRequest, provproto.ConfigureResponse>,
        callback: any,
    ): Promise<void> {
        const protoArgs = call.request.getArgs();
        if (!protoArgs) {
            throw new Error("ConfigureRequest missing args");
        }
        const args = protoArgs.toJavaScript();
        const config: Record<string, any> = {};
        for (const [k, v] of Object.entries(args)) {
            if (k === providerKey) {
                continue;
            }
            config[k] = rpc.unwrapRpcSecret(v);
        }
        this.config = config;
        const resp = new provproto.ConfigureResponse();
        resp.setAcceptsecrets(false);
        callback(undefined, resp);
    }

    async invoke(call: any, callback: any): Promise<void> {
        const req: any = call.request;

View on GitHub (pinned to 793f7b2e16)

Solutions

  1. Upgrade the Pulumi CLI and the dynamic provider plugin so engine and provider use the same provider proto version
  2. If invoking the gRPC server directly (tests/tools), always set args on the ConfigureRequest before calling configure
  3. Clear stale plugin binaries (pulumi plugin rm --all) and reinstall so the correct dynamic provider implementation is used
  4. Report a bug if a stock `pulumi up` hits this, since the engine normally always sends args

Example fix

// before (direct gRPC test call)
const req = new provproto.ConfigureRequest();
await provider.configure({ request: req }, cb); // throws: ConfigureRequest missing args
// after
const req = new provproto.ConfigureRequest();
req.setArgs(new proto.Struct()); // args must be present (may be empty)
await provider.configure({ request: req }, cb);
Defensive patterns

Strategy: validation

Validate before calling

// In a direct gRPC client/test of the dynamic provider:
const req = new provproto.ConfigureRequest();
if (!req.getArgs()) {
  req.setArgs(new proto.Struct()); // ensure args is always set before calling configure
}

Type guard

function hasArgs(req: provproto.ConfigureRequest): boolean {
  return req.getArgs() != null;
}

Try / catch

try {
  await provider.configure(call, callback);
} catch (e) {
  if (e.message === 'ConfigureRequest missing args') {
    // fail the RPC with an InvalidArgument status instead of crashing
    callback({ code: grpc.status.INVALID_ARGUMENT, message: e.message });
  } else throw e;
}

Prevention

When it happens

Trigger: A provproto.ConfigureRequest is delivered to the dynamic provider's configure() handler with getArgs() returning null/undefined, e.g. the engine sends a Configure RPC without args set (old/mismatched engine version or hand-crafted gRPC client).

Common situations: Running a dynamic provider plugin against a mismatched pulumi CLI version whose provider proto/Configure path omits args; custom tooling or tests invoking the dynamic provider's gRPC server directly without populating args.

Related errors


AI-assisted analysis of pulumi/pulumi@793f7b2e16 (2026-08-31). Data as JSON: /api/errors/11e15e59bb01d770. Report an issue: GitHub.