Skip to content

Commit 04a72c0

Browse files
Remove unnecessary dependencies for CAI feed examples. (#5371) (#3843)
Signed-off-by: Modular Magician <[email protected]>
1 parent 7ac5272 commit 04a72c0

7 files changed

+3
-84
lines changed

.changelog/5371.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
asset: remove unnecessary service account dependency for asset feed examples.
3+
```

google-beta/resource_cloud_asset_folder_feed_generated_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff 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" {
10398
data "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

google-beta/resource_cloud_asset_organization_feed_generated_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff 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" {
9792
data "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

google-beta/resource_cloud_asset_project_feed_generated_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff 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" {
9489
data "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

website/docs/r/cloud_asset_folder_feed.html.markdown

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff 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" {
8681
data "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

website/docs/r/cloud_asset_organization_feed.html.markdown

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff 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" {
8075
data "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

website/docs/r/cloud_asset_project_feed.html.markdown

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff 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" {
7873
data "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

0 commit comments

Comments
 (0)