File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ ```release-note:none
2+ ```
Original file line number Diff line number Diff line change @@ -185,6 +185,37 @@ resource "google_cloud_run_service" "default" {
185185 autogenerate_revision_name = true
186186}
187187```
188+ ## Example Usage - Cloud Run Service Traffic Split
189+
190+
191+ ``` hcl
192+ resource "google_cloud_run_service" "default" {
193+ name = "cloudrun-srv"
194+ location = "us-central1"
195+
196+ template {
197+ spec {
198+ containers {
199+ image = "gcr.io/cloudrun/hello"
200+ }
201+ }
202+ metadata {
203+ name = "cloudrun-srv-green"
204+ }
205+ }
206+
207+ traffic {
208+ percent = 25
209+ revision_name = "cloudrun-srv-green"
210+ }
211+
212+ traffic {
213+ percent = 75
214+ # This revision needs to already exist
215+ revision_name = "cloudrun-srv-blue"
216+ }
217+ }
218+ ```
188219
189220## Argument Reference
190221
You can’t perform that action at this time.
0 commit comments