# golang


02/26/2024, 10:06 AM
Hey All, Any one tried to mount a Cloud Storage Bucket to a Golang CloudRunv2 Service with Pulumi? I am getting a couple of strange errors here and I am not sure what is going on to be honest. So in my CloudRun Service I am Defining Volume as follows inside my Cloud Run service template:
Copy code
Volumes: &cloudrunv2.ServiceTemplateVolumeArray{
                                    Name: pulumi.String("bucket"),
                                    // Define the GCS bucket characteristics here.
                                    Gcs: &cloudrunv2.ServiceTemplateVolumeGcsArgs{        // LINE 424 - From STDERR
                                        Bucket:   gcsBucket.Name,
                                        ReadOnly: pulumi.Bool(false),
When attempting to execute though I am getting the following two errors:
Copy code
./main.go:424:10: unknown field Gcs in struct literal of type cloudrunv2.ServiceTemplateVolumeArgs
    ./main.go:424:27: undefined: cloudrunv2.ServiceTemplateVolumeGcsArgs
I marked the lines in the code above with a comment for clarity. This is puzzling to me. The PKG says that field “Gcs” does exist in that struct definition. Additionally in the docs the ServiceTemplateVolumeGcsArgs type does exist. So I am a little baffled at what I might be missing here. Would appreciate any input and thoughts; I will also crosspost in Google-Cloud Channel


02/27/2024, 7:06 PM
Hello, I am not familiar with GCP, but I did a quick search in the repo, It seems that field
has been added around one month ago. Git blame: Following from there, we see the PR "Upgrading terraform-provider-google-beta from 5.12.0 to 5.13.0." If you search in that PR[…]66b729264b36f722ece2f1e02006d4 and finally
Copy code
+ // Represents a GCS Bucket mounted as a volume.
+ // Structure is documented below.
+ Gcs *ServiceTemplateVolumeGcs `pulumi:"gcs"`


02/27/2024, 9:17 PM
This is interesting. But I think everything I have is updated. So I’m not sure how to solve it