dazzling-winter-63255
04/28/2024, 9:25 AMType Name Status
pulumi:pulumi:Stack infrastructure-dev **failed**
+ └─ gcp:cloudfunctionsv2:Function ts-func **creating fail
Diagnostics:
pulumi:pulumi:Stack (infrastructure-dev):
error: update failed
gcp:cloudfunctionsv2:Function (ts-func):
error: 1 error occurred:
* creating urn:pulumi:dev::infrastructure::gcp:cloudfunctionsv2/function:Function::ts-func: 1 error occurred:
* Error waiting to create function: Error waiting for Creating function: Error code 3, message: Build failed with status: FAILURE and message: function.js does not exist. For more details see the logs at <https://console.cloud.google.com/cloud-build/builds;region=europe-central2/71467e32-4bdf-4738-8687-58a5e549d698?project=549867399939>.
dazzling-winter-63255
04/28/2024, 3:55 PMimport * as gcp from '@pulumi/gcp';
import * as pulumi from '@pulumi/pulumi';
const bucket = new gcp.storage.Bucket('bucket', {
location: 'EU',
uniformBucketLevelAccess: true,
});
const object = new gcp.storage.BucketObject('object', {
name: 'function-source.zip',
bucket: bucket.name,
source: new pulumi.asset.FileAsset('functions/src/foo.ts'),
});
const _function = new gcp.cloudfunctionsv2.Function('function', {
location: 'europe-central2',
description: 'a new function',
buildConfig: {
runtime: 'nodejs20',
entryPoint: 'handler',
source: {
storageSource: {
bucket: bucket.name,
object: object.name,
},
},
},
});
export const functionUri = _function.serviceConfig.apply((serviceConfig) => serviceConfig?.uri);
I think we need to bundle the code because NodeJS does not understand Typescript.dazzling-winter-63255
04/29/2024, 4:40 PMprehistoric-fountain-95142
05/02/2024, 1:11 AMdazzling-winter-63255
05/23/2024, 9:58 AMfunction.js
which really confuses me and I hoped that Pulumi could help here.No 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