-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traffic tags and URLs removed from Cloud Run traffic definition #8654
Traffic tags and URLs removed from Cloud Run traffic definition #8654
Comments
Today I found out this is blocking us to determine which version had originally the traffic so we can leave it as it is, if we want just to cold start new containers...is it difficult to implement? I would like to participate if needed :) |
Hi! Can we expect this to be enhanced any time soon? How can I help to push this a bit? :) @rileykarson |
Any news on this issue? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
When any change to Cloud Run resource (
google_cloud_run_service
) is triggered, theapply
removes existing values from the Traffic property of the service definition.In our set-up we use Terraform to manage the Cloud Run deployment (env vars, IAM, resources ...) but we use Cloud Build to deploy new revisions. For these revisions we assign a traffic tag using
gcloud
CLI. The YAML definition after a few deployments looks like:When terraform runs on an unrelated change (such as a change in env var), the plan shows only the env var change. However, when
apply
runs it removes all thetag
andurl
properties, so thetraffic
then looks like:and we lose our traffic tags and ability to hit/test specific revisions.
From a quick look, I believe the root cause is a mismatch in the schema of the traffic object. Google docs define it as
However, the provider seems to only have:
as per the code here. And I suspect when this function runs it strips out everything except the 3 known properties:
terraform-provider-google/google/resource_cloud_run_service.go
Lines 1018 to 1022 in 20c4bfc
Can the TF's schema be updated to match the GCP's one? Any suggested workarounds in the meantime?
New or Affected Resource(s)
The text was updated successfully, but these errors were encountered: