pulumi / pulumi-gcp

A Google Cloud Platform (GCP) Pulumi resource package, providing multi-language access to GCP
Apache License 2.0
179 stars 52 forks source link

Missing VPC connector option arg in HttpCallbackFunction #333

Open choyg opened 4 years ago

choyg commented 4 years ago

The vpcConnector can be supplied to a normal GCP Function, but not a HttpCallbackFunction which causes a type error if supplied. The correct resources are generated if casting to any:

const connectorArg = {
  vpcConnector: connector.name,
} as any;

const fn = new gcp.cloudfunctions.HttpCallbackFunction("function", {
  ...connectorArg,
});

Function args: https://github.com/pulumi/pulumi-gcp/blob/86ff099c99c4b946d895484ceb79a950bd82be7e/sdk/nodejs/cloudfunctions/function.ts#L128-L131

leezen commented 4 years ago

Oddly, the mixin defines its own interface for the arguments instead of simply inheriting from the generated one. Not sure about the history behind that, but assuming we can just switch to that, I think that would clear this up.

rlweb commented 3 years ago

Yep, this would save us countless hours!