File tree Expand file tree Collapse file tree 7 files changed +3
-84
lines changed Expand file tree Collapse file tree 7 files changed +3
-84
lines changed Original file line number Diff line number Diff line change 1+ ```release-note:none
2+ asset: remove unnecessary service account dependency for asset feed examples.
3+ ```
Original file line number Diff line number Diff line change @@ -79,11 +79,6 @@ resource "google_cloud_asset_folder_feed" "folder_feed" {
7979 title = "created"
8080 description = "Send notifications on creation events"
8181 }
82-
83- # Wait for the permission to be ready on the destination topic.
84- depends_on = [
85- google_pubsub_topic_iam_member.cloud_asset_writer,
86- ]
8782}
8883
8984# The topic where the resource change notifications will be sent.
@@ -103,15 +98,6 @@ resource "google_folder" "my_folder" {
10398data "google_project" "project" {
10499 project_id = "%{project}"
105100}
106-
107- # Allow the publishing role to the Cloud Asset service account of the project that
108- # was used for sending the notifications.
109- resource "google_pubsub_topic_iam_member" "cloud_asset_writer" {
110- project = "%{project}"
111- topic = google_pubsub_topic.feed_output.id
112- role = "roles/pubsub.publisher"
113- member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-cloudasset.iam.gserviceaccount.com"
114- }
115101` , context )
116102}
117103
Original file line number Diff line number Diff line change @@ -79,11 +79,6 @@ resource "google_cloud_asset_organization_feed" "organization_feed" {
7979 title = "created"
8080 description = "Send notifications on creation events"
8181 }
82-
83- # Wait for the permission to be ready on the destination topic.
84- depends_on = [
85- google_pubsub_topic_iam_member.cloud_asset_writer,
86- ]
8782}
8883
8984# The topic where the resource change notifications will be sent.
@@ -97,15 +92,6 @@ resource "google_pubsub_topic" "feed_output" {
9792data "google_project" "project" {
9893 project_id = "%{project}"
9994}
100-
101- # Allow the publishing role to the Cloud Asset service account of the project that
102- # was used for sending the notifications.
103- resource "google_pubsub_topic_iam_member" "cloud_asset_writer" {
104- project = "%{project}"
105- topic = google_pubsub_topic.feed_output.id
106- role = "roles/pubsub.publisher"
107- member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-cloudasset.iam.gserviceaccount.com"
108- }
10995` , context )
11096}
11197
Original file line number Diff line number Diff line change @@ -76,11 +76,6 @@ resource "google_cloud_asset_project_feed" "project_feed" {
7676 title = "created"
7777 description = "Send notifications on creation events"
7878 }
79-
80- # Wait for the permission to be ready on the destination topic.
81- depends_on = [
82- google_pubsub_topic_iam_member.cloud_asset_writer,
83- ]
8479}
8580
8681# The topic where the resource change notifications will be sent.
@@ -94,15 +89,6 @@ resource "google_pubsub_topic" "feed_output" {
9489data "google_project" "project" {
9590 project_id = "%{project}"
9691}
97-
98- # Allow the publishing role to the Cloud Asset service account of the project that
99- # was used for sending the notifications.
100- resource "google_pubsub_topic_iam_member" "cloud_asset_writer" {
101- project = "%{project}"
102- topic = google_pubsub_topic.feed_output.id
103- role = "roles/pubsub.publisher"
104- member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-cloudasset.iam.gserviceaccount.com"
105- }
10692` , context )
10793}
10894
Original file line number Diff line number Diff line change @@ -62,11 +62,6 @@ resource "google_cloud_asset_folder_feed" "folder_feed" {
6262 title = "created"
6363 description = "Send notifications on creation events"
6464 }
65-
66- # Wait for the permission to be ready on the destination topic.
67- depends_on = [
68- google_pubsub_topic_iam_member.cloud_asset_writer,
69- ]
7065}
7166
7267# The topic where the resource change notifications will be sent.
@@ -86,15 +81,6 @@ resource "google_folder" "my_folder" {
8681data "google_project" "project" {
8782 project_id = "my-project-name"
8883}
89-
90- # Allow the publishing role to the Cloud Asset service account of the project that
91- # was used for sending the notifications.
92- resource "google_pubsub_topic_iam_member" "cloud_asset_writer" {
93- project = "my-project-name"
94- topic = google_pubsub_topic.feed_output.id
95- role = "roles/pubsub.publisher"
96- member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-cloudasset.iam.gserviceaccount.com"
97- }
9884```
9985
10086## Argument Reference
Original file line number Diff line number Diff line change @@ -62,11 +62,6 @@ resource "google_cloud_asset_organization_feed" "organization_feed" {
6262 title = "created"
6363 description = "Send notifications on creation events"
6464 }
65-
66- # Wait for the permission to be ready on the destination topic.
67- depends_on = [
68- google_pubsub_topic_iam_member.cloud_asset_writer,
69- ]
7065}
7166
7267# The topic where the resource change notifications will be sent.
@@ -80,15 +75,6 @@ resource "google_pubsub_topic" "feed_output" {
8075data "google_project" "project" {
8176 project_id = "my-project-name"
8277}
83-
84- # Allow the publishing role to the Cloud Asset service account of the project that
85- # was used for sending the notifications.
86- resource "google_pubsub_topic_iam_member" "cloud_asset_writer" {
87- project = "my-project-name"
88- topic = google_pubsub_topic.feed_output.id
89- role = "roles/pubsub.publisher"
90- member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-cloudasset.iam.gserviceaccount.com"
91- }
9278```
9379
9480## Argument Reference
Original file line number Diff line number Diff line change @@ -60,11 +60,6 @@ resource "google_cloud_asset_project_feed" "project_feed" {
6060 title = "created"
6161 description = "Send notifications on creation events"
6262 }
63-
64- # Wait for the permission to be ready on the destination topic.
65- depends_on = [
66- google_pubsub_topic_iam_member.cloud_asset_writer,
67- ]
6863}
6964
7065# The topic where the resource change notifications will be sent.
@@ -78,15 +73,6 @@ resource "google_pubsub_topic" "feed_output" {
7873data "google_project" "project" {
7974 project_id = "my-project-name"
8075}
81-
82- # Allow the publishing role to the Cloud Asset service account of the project that
83- # was used for sending the notifications.
84- resource "google_pubsub_topic_iam_member" "cloud_asset_writer" {
85- project = "my-project-name"
86- topic = google_pubsub_topic.feed_output.id
87- role = "roles/pubsub.publisher"
88- member = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-cloudasset.iam.gserviceaccount.com"
89- }
9076```
9177
9278## Argument Reference
You can’t perform that action at this time.
0 commit comments