Many thanks @gentle-diamond-70147. Could you recommend a library or method to do the md5 hash?
wet-ambulance-3300
02/22/2021, 5:00 PM
Hi @gentle-diamond-70147, I landed on this in the end.
Copy code
import * as SparkMD5 from 'spark-md5'
import * as pulumi from '@pulumi/pulumi'
import * as gcp from '@pulumi/gcp'
const source_archive = new pulumi.asset.FileArchive(args.source_directory)
const source_object = new gcp.storage.BucketObject('source_object', {
name: pulumi.output(source_archive.path).apply(file => `${SparkMD5.hash(file)}.zip`),
bucket: source_bucket.name,
source: source_archive.path
})
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.