Hi there.
Is there any way for Terraform to both manage objects in cloud storage, whilst preventing the deletion of these objects? I understand that this question pretty much goes against the design intentions for Terraform. However, I’m hoping someone has some kind of way around it. I’ll explain my use-case below.
I am using Terraform to deploy cloud functions to Google. I’m zipping up a directory, uploading that zip file to Cloud Storage, and then deploying the function from that zip file. The filename of the zip file is something along the lines of source-${md5 checksum of file}.zip
.
The way Terraform works, there’ll only ever be the most recent file contained in the Cloud Storage bucket. Ideally, I’d like Terraform to ensure the zip file is present, but I’d also like it to not delete the older files.
Is this possible, or is it something that I should just be making use of the gsutil
command for?