Looking for some best practice guidance on Cloud F...
# google-cloud
s
Looking for some best practice guidance on Cloud Functions. Presently on v1, below spec. Looking for a method to keep the CFs up-to-date with HEAD on the identified branch. This doesn't appear possible natively via Pulumi/Terraform (per this ticket). It doesn't seem ideal either to add another CI component for a resource that's managed in IaC? We've had issues deploying CFv2 previously, I can revisit, is this better handled with v2?
Copy code
lora-iot-provision:
  type: gcp:cloudfunctions:Function
  properties:
    description: "Provisions a wireless device in AWS IoT."
    runtime: go119
    availableMemoryMb: 256
    environmentVariables:
      APP_ENV: ${iotEnv}
      AWS_REGION: us-east-1
    secretEnvironmentVariables:
      - key: AWS_ACCESS_KEY_ID
        secret: cf_iotAwsAccessKey_${environment}
        version: latest
        projectId: my-gcp-proj
      - key: AWS_SECRET_ACCESS_KEY
        secret: cf_iotAwsSecretKey_${environment}
        version: latest
        projectId: my-gcp-proj
    entryPoint: ProvisionDevicePubSub
    eventTrigger:
      eventType: providers/cloud.pubsub/eventTypes/topic.publish
      resource: projects/${pulumi.stack}/topics/lorawan-device-provisioned
    project: ${pulumi.stack}
    region: us-east1
    serviceAccountEmail: ${cloud-functions-sa.email}
    sourceRepository: 
      url: "<https://source.developers.google.com/projects/my-gcp-proj/repos/github_my-mirrored-repo/moveable-aliases/main/paths/lora-iot-provision>"