Skip to content

Commit

Permalink
Fix "Pubsub Subscription Different Project" example
Browse files Browse the repository at this point in the history
PR GoogleCloudPlatform#2342 changed this example from using `id` to `name`, which removed the project ID from the topic. However, the point of this example is to show how to set up a cross-project subscription, so the example no longer works. This change reverts that change from PR GoogleCloudPlatform#2342.

Fixes hashicorp/terraform-provider-google#11642.
Fixes hashicorp/terraform-provider-google#6024.
  • Loading branch information
glasser authored Dec 13, 2023
1 parent 3bacb44 commit b8f4c99
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ resource "google_pubsub_topic" "<%= ctx[:primary_resource_id] %>" {
resource "google_pubsub_subscription" "<%= ctx[:primary_resource_id] %>" {
project = "<%= ctx[:vars]['subscription_project'] %>"
name = "<%= ctx[:vars]['subscription_name'] %>"
topic = google_pubsub_topic.<%= ctx[:primary_resource_id] %>.name
topic = google_pubsub_topic.<%= ctx[:primary_resource_id] %>.id
}

0 comments on commit b8f4c99

Please sign in to comment.