Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Doc: Example Usage - Pubsub Subscription Different Project #11642

Comments

@whyvez
Copy link

whyvez commented May 4, 2022

Affected Resource(s)

  • google_pubsub_subscription

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_subscription#example-usage---pubsub-subscription-different-project

resource "google_pubsub_topic" "example" {
  project = "topic-project"
  name    = "example-topic"
}

resource "google_pubsub_subscription" "example" {
  project = "subscription-project"
  name    = "example-subscription"
-  topic   = google_pubsub_topic.example.name
+  topic   = google_pubsub_topic.example.id
}

b/302797491

@rileykarson
Copy link
Collaborator

BOD: verify this works as intended as-is, and if it does feel free to remove bug

@shigwata
Copy link

other examples are also wrong.

@rileykarson rileykarson removed the bug label Mar 6, 2023
@rileykarson rileykarson closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2023
@melinath melinath reopened this Mar 20, 2023
@melinath
Copy link
Collaborator

It looks like the tests for this example are currently skipped - we should enable them and fix the example as described above.

@rileykarson rileykarson added this to the Goals milestone Mar 27, 2023
@github-actions github-actions bot added forward/review In review; remove label to forward service/pubsub labels Aug 17, 2023
@roaks3 roaks3 removed the forward/review In review; remove label to forward label Sep 29, 2023
@glasser
Copy link

glasser commented Dec 13, 2023

This error still exists in the docs. It was introduced in 2019 in @rileykarson 's PR GoogleCloudPlatform/magic-modules#2342 which changed from name to id. Unfortunately the whole point of this example is that it is cross-project and requires id.

glasser added a commit to glasser/magic-modules that referenced this issue Dec 13, 2023
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.
@glasser
Copy link

glasser commented Dec 13, 2023

GoogleCloudPlatform/magic-modules#9637 should fix it.

melinath added a commit to GoogleCloudPlatform/magic-modules that referenced this issue Dec 14, 2023
…ll examples cross-project-friendly (#9637)

* Fix "Pubsub Subscription Different Project" example

PR #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 #2342.

Fixes hashicorp/terraform-provider-google#11642.
Fixes hashicorp/terraform-provider-google#6024.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------

Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
modular-magician added a commit to modular-magician/docs-examples that referenced this issue Dec 14, 2023
…ll examples cross-project-friendly (#9637)

* Fix "Pubsub Subscription Different Project" example

PR #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 #2342.

Fixes hashicorp/terraform-provider-google#11642.
Fixes hashicorp/terraform-provider-google#6024.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------

Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
[upstream:b3ae8dcd7e476f796a8b1ba67ce63cea711be127]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to terraform-google-modules/docs-examples that referenced this issue Dec 14, 2023
…ll examples cross-project-friendly (#9637) (#621)

* Fix "Pubsub Subscription Different Project" example

PR #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 #2342.

Fixes hashicorp/terraform-provider-google#11642.
Fixes hashicorp/terraform-provider-google#6024.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------


[upstream:b3ae8dcd7e476f796a8b1ba67ce63cea711be127]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to modular-magician/terraform-provider-google-beta that referenced this issue Dec 14, 2023
…ll examples cross-project-friendly (#9637)

* Fix "Pubsub Subscription Different Project" example

PR hashicorp#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 hashicorp#2342.

Fixes hashicorp/terraform-provider-google#11642.
Fixes hashicorp/terraform-provider-google#6024.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------

Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
[upstream:b3ae8dcd7e476f796a8b1ba67ce63cea711be127]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Dec 14, 2023
…ll examples cross-project-friendly (hashicorp#9637)

* Fix "Pubsub Subscription Different Project" example

PR hashicorp#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 hashicorp#2342.

Fixes hashicorp#11642.
Fixes hashicorp#6024.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------

Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
[upstream:b3ae8dcd7e476f796a8b1ba67ce63cea711be127]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to hashicorp/terraform-provider-google-beta that referenced this issue Dec 14, 2023
…ll examples cross-project-friendly (#9637) (#6758)

* Fix "Pubsub Subscription Different Project" example

PR #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 #2342.

Fixes hashicorp/terraform-provider-google#11642.
Fixes hashicorp/terraform-provider-google#6024.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------


[upstream:b3ae8dcd7e476f796a8b1ba67ce63cea711be127]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit that referenced this issue Dec 14, 2023
…ll examples cross-project-friendly (#9637) (#16806)

* Fix "Pubsub Subscription Different Project" example

PR #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 #2342.

Fixes #11642.
Fixes #6024.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------


[upstream:b3ae8dcd7e476f796a8b1ba67ce63cea711be127]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to modular-magician/terraform-google-conversion that referenced this issue Dec 15, 2023
…ll examples cross-project-friendly (#9637)

* Fix "Pubsub Subscription Different Project" example

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.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------

Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
[upstream:b3ae8dcd7e476f796a8b1ba67ce63cea711be127]

Signed-off-by: Modular Magician <[email protected]>
modular-magician added a commit to GoogleCloudPlatform/terraform-google-conversion that referenced this issue Dec 15, 2023
…ll examples cross-project-friendly (#9637) (#1794)

* Fix "Pubsub Subscription Different Project" example

PR #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 #2342.

Fixes hashicorp/terraform-provider-google#11642.
Fixes hashicorp/terraform-provider-google#6024.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------


[upstream:b3ae8dcd7e476f796a8b1ba67ce63cea711be127]

Signed-off-by: Modular Magician <[email protected]>
kapreus pushed a commit to kapreus/magic-modules that referenced this issue Jan 2, 2024
…ll examples cross-project-friendly (GoogleCloudPlatform#9637)

* Fix "Pubsub Subscription Different Project" example

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.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------

Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this issue May 2, 2024
…ll examples cross-project-friendly (GoogleCloudPlatform#9637)

* Fix "Pubsub Subscription Different Project" example

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.

* Make all examples cross-project-friendly and update topic description

* Fix typo

---------

Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.