silly-match-79024
07/16/2024, 7:33 AMancient-policeman-24615
07/16/2024, 6:52 PMsilly-match-79024
07/23/2024, 6:35 AMEnvironmentVariable
that looks like this
type EnvironmentVariable struct {
Name string `pulumi:"name"`
Value string `pulumi:"value"`
}
I use this struct in a ResourceArgs object as an array
type ServerlessFunctionArgs struct {
Path string `pulumi:"path"`
EnvironmentVariables []domain.EnvironmentVariable `pulumi:"environmentVariables,optional"`
}
But when i call pulumi up on my nodejs example i get this error
error: Running program '/workspaces/pulumi-genezio/examples/nodejs/' failed with an unhandled exception:
<ref *1> Error: 13 INTERNAL: Request message serialization failure: b.Va is not a function
at callErrorFromStatus (/workspaces/pulumi-genezio/examples/nodejs/node_modules/@grpc/grpc-js/src/call.ts:82:17)
at Object.onReceiveStatus (/workspaces/pulumi-genezio/examples/nodejs/node_modules/@grpc/grpc-js/src/client.ts:360:55)
at Object.onReceiveStatus (/workspaces/pulumi-genezio/examples/nodejs/node_modules/@grpc/grpc-js/src/client-interceptors.ts:458:34)
at Object.onReceiveStatus (/workspaces/pulumi-genezio/examples/nodejs/node_modules/@grpc/grpc-js/src/client-interceptors.ts:419:48)
at /workspaces/pulumi-genezio/examples/nodejs/node_modules/@grpc/grpc-js/src/resolving-call.ts:163:24
at processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
at ServiceClientImpl.makeUnaryRequest (/workspaces/pulumi-genezio/examples/nodejs/node_modules/@grpc/grpc-js/src/client.ts:325:42)
at ServiceClientImpl.registerResourceOutputs (/workspaces/pulumi-genezio/examples/nodejs/node_modules/@grpc/grpc-js/src/make-client.ts:189:15)
at /workspaces/pulumi-genezio/examples/nodejs/node_modules/@pulumi/runtime/resource.ts:1087:33
at new Promise (<anonymous>)
at Object.<anonymous> (/workspaces/pulumi-genezio/examples/nodejs/node_modules/@pulumi/runtime/resource.ts:1086:21)
at Generator.next (<anonymous>)
at fulfilled (/workspaces/pulumi-genezio/examples/nodejs/node_modules/@pulumi/pulumi/runtime/resource.js:18:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 13,
details: 'Request message serialization failure: b.Va is not a function',
metadata: Metadata { internalRepr: Map(0) {}, options: {} },
promise: Promise { <rejected> [Circular *1] }
}
silly-match-79024
07/23/2024, 3:37 PMconst myFunction = new genezio.ServerlessFunction("MyFunction", {
folderHash: sha256FromFolder("./function"),
path: "./function",
projectName: "project-function-pulumi-2",
region: "us-east-1",
entry: "app.mjs",
handler: "handler",
name: "my-function",
authToken: process.env.AUTH_TOKEN ?? "",
environmentVariables: {
NAME: "Hellos",
MYENVVAR: "Worlds",
},
});
export const functionsdasdOutput = {
projectId: myFunction.projectId,
projectEnvId: myFunction.projectEnvId,
functionId: myFunction.functionId,
};
For some reason if i have an array of custom objects in the ResourceArgs when i do any kind of export based on that resource i get the error mentioned aboveNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by