@@ -48,61 +48,6 @@ To get more information about Service, see:
4848a Cloud Run Service on Anthos(GKE/VMWare) then you will need to create it using the kubernetes alpha provider.
4949Have a look at the Cloud Run Anthos example below.
5050
51- ## Example Usage - Cloud Run Service Pubsub
52-
53-
54- ``` hcl
55- resource "google_cloud_run_service" "default" {
56- name = "cloud_run_service_name"
57- location = "us-central1"
58- template {
59- spec {
60- containers {
61- image = "gcr.io/cloudrun/hello"
62- }
63- }
64- }
65- traffic {
66- percent = 100
67- latest_revision = true
68- }
69- }
70-
71- resource "google_service_account" "sa" {
72- account_id = "cloud-run-pubsub-invoker"
73- display_name = "Cloud Run Pub/Sub Invoker"
74- }
75-
76- resource "google_cloud_run_service_iam_binding" "binding" {
77- location = google_cloud_run_service.default.location
78- service = google_cloud_run_service.default.name
79- role = "roles/run.invoker"
80- members = ["serviceAccount:"]
81- }
82-
83- resource "google_project_iam_binding" "project" {
84- role = "roles/iam.serviceAccountTokenCreator"
85- members = ["serviceAccount:"]
86- }
87-
88- resource "google_pubsub_topic" "topic" {
89- name = "pubsub_topic"
90- }
91-
92- resource "google_pubsub_subscription" "subscription" {
93- name = "pubsub_subscription"
94- topic = google_pubsub_topic.topic.name
95- push_config {
96- push_endpoint = ""
97- oidc_token {
98- service_account_email = ""
99- }
100- attributes = {
101- x-goog-version = "v1"
102- }
103- }
104- }
105- ```
10651## Example Usage - Cloud Run Service Basic
10752
10853
0 commit comments