https://pulumi.com logo
#google-cloud
Title
# google-cloud
h

happy-gpu-24908

12/10/2021, 11:28 PM
Hi there, is there any way to set cloud run revision traffic tag?
e

elegant-window-55250

12/12/2021, 8:01 PM
👋 What are you trying to do? Maybe you can share some more information to make it easier for me to help out 🙂
h

happy-gpu-24908

12/18/2021, 11:49 AM
cloud run supports url pinning for an exact revision.
but I can not achieve this with neither terraform nor pulumi.
The yml in service spec looks like this:
Copy code
traffic:
  - percent: 100
    latestRevision: true
  - revisionName: hello-00001-wik
    tag: v1-0-0
  - revisionName: hello-00001-wik
    tag: v1-0-0-beta
  - revisionName: hello-00004-juk
    tag: v2-0-0
  - revisionName: hello-00004-juk
    tag: v2-0-0-beta
So, the revision tag is configurable via yml. But not configurable via pulumi or terraform
e

elegant-window-55250

12/18/2021, 10:11 PM
This is probably a nice use-case for the native Google provider. AFAIK, this is supported in this. Mind you: the native provider is currently in developer preview, so there be dragons. However, you can combine it with the current version anyway. https://github.com/pulumi/pulumi-google-native/
h

happy-gpu-24908

12/31/2021, 1:47 PM
That's nice. But the native provider breaks a lot of thing and it doesn't properly follow the knative yml schema as well. So, few example would be better as the original provider has. Thanks for letting me know about this provider.
e

elegant-window-55250

12/31/2021, 1:55 PM
AFAIK, It should be fully compliant with Google's API schema. The native provider is automatically generated, so there should be great/good coverage. I would recommend that you still use the current Google provider for most of your application, and only use the native provider for this particular resource.
They live well together 🙂 I've used them together for quite some time now.
5 Views