-
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
google_cloud_run_v2_service and google_cloud_run_v2_job do not support Direct VPC egress with a VPC network #15568
google_cloud_run_v2_service and google_cloud_run_v2_job do not support Direct VPC egress with a VPC network #15568
Comments
Please tell me what is known about this problem? How can it be solved, maybe there is an example? |
Hello, right now I solve this by YML file: apiVersion: serving.knative.dev/v1
kind: Service
metadata:
...
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/minScale: '1'
autoscaling.knative.dev/maxScale: '4'
run.googleapis.com/network-interfaces: '[{"network":"private-network","subnetwork":"subnet","tags":["net"]}]'
run.googleapis.com/vpc-access-egress: private-ranges-only
run.googleapis.com/cpu-throttling: 'true'
run.googleapis.com/startup-cpu-boost: 'true'
run.googleapis.com/sessionAffinity: 'false'
run.googleapis.com/execution-environment: gen2
spec:
containerConcurrency: 20
timeoutSeconds: '60'
...
Major parts here is "run.googleapis.com/network-interfaces" and "run.googleapis.com/vpc-access-egress" and apply this changes by |
Thanks to Vasily @le0pard. |
@mrak- that is why this issue exists |
@le0pard have you been able to find a way to make this work? |
@skadecl I already wrote how I resolved this issue in this comment - #15568 (comment) No solution for terraform right now |
so for the yaml approach, are you deploying the cloud run instance entirely through gcloud cli or are you deploying it with terraform and then setting the vpc egress setting with gcloud? |
@skadecl terraform don't manage cloud run at all, because if option will be change by yml, terraform cloud run resource will be broken and terraform will fail to apply cloud run. So gcloud cli with yml files manage cloud run resources |
If the API supports setting up direct egress with a VPC network, then it should be possible to support in Terraform. That would be the easiest fix. However, there is no specific timeline at the moment. |
Direct VPC egress support was just added to Cloud Run v2 API. The public document hasn't been updated yet. Terraform support is WIP. |
whoa, Support appeared https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service |
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. |
Description
Cloud Run v2 have in preview "Direct VPC egress", which based on this comparison https://cloud.google.com/run/docs/configuring/vpc-connect-comparison much better than "Serverless VPC Access connectors"
Problem, that "google_cloud_run_v2_service" in "vpc_access" support only "connector" for "Serverless VPC Access connectors" and "egress" settings. Even if I am try to skip "connector" and only have "egress", I will get error:
Same issue have "google_cloud_run_v2_job" resource.
More info about "Direct VPC egress": https://cloud.google.com/run/docs/configuring/vpc-direct-vpc
New or Affected Resource(s)
Potential Terraform Configuration
I cannot find API call attributes, but I see this payload part, which json payload send GCP UI
References
b/298050505
The text was updated successfully, but these errors were encountered: