Terraform Topic resource already exists in across projects? How to handle this?What is the correct way to add a second disk using Terraform on Google ComputeHow to configure credential file for TerraformTerraform on GCP fails to create pubsub topic stating permission deniedTerraform google 'compute.subnetworks.use' permission issuewhy do we get resource exists error in terraform?google storage transfer service account does not exist in new projectTerraform auth not working when adding resourcesPub Sub Topic not associated with Project errorGoogle Pubsub Subscription based on attributes or Message contentAssign existing SNS Topic to Alarm in Terraform

How to switch an 80286 from protected to real mode?

Can I enter a rental property without giving notice if I'm afraid a tenant may be hurt?

Do some languages mention the top limit of a range first?

Whats the difference between <processors> and <pipelines> in Sitecore configuration?

What does the ISO setting for mechanical 35mm film cameras actually do?

split large formula in align

Is the first page of a novel really that important?

Is a switch from R to Python worth it?

How do I get the =LEFT function in excel, to also take the number zero as the first number?

Is space radiation a risk for space film photography, and how is this prevented?

London underground zone 1-2 train ticket

Which genus do I use for neutral expressions in German?

Vibration on the guitar when playing two strings

What's going on with an item that starts with an hbox?

Not been paid even after reminding the Treasurer; what should I do?

Ubuntu show wrong disk sizes, how to solve it?

Plato and the knowledge of the forms

What is an air conditioner compressor hard start kit and how does it work?

What is the German idiom or expression for when someone is being hypocritical against their own teachings?

What are the function of EM and EN spaces?

Why does putting a dot after the URL remove login information?

Find only those folders that contain a File with the same name as the Folder

If someone else uploads my GPL'd code to Github without my permission, is that a copyright violation?

Where to pee in London?



Terraform Topic resource already exists in across projects? How to handle this?


What is the correct way to add a second disk using Terraform on Google ComputeHow to configure credential file for TerraformTerraform on GCP fails to create pubsub topic stating permission deniedTerraform google 'compute.subnetworks.use' permission issuewhy do we get resource exists error in terraform?google storage transfer service account does not exist in new projectTerraform auth not working when adding resourcesPub Sub Topic not associated with Project errorGoogle Pubsub Subscription based on attributes or Message contentAssign existing SNS Topic to Alarm in Terraform






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















How to deal with resources existing in multiple projects. In this case I have 2 TF projects and have a shared topic in google pubsub. Following the google provider docs I created this configuration in the subscriber project. But it gives me a resource already exists error.



resource "google_pubsub_topic" "item_edited" 
project = "listing-dev"
name = "item_edited"



So this resource already exits in some other project but following the guides I created it our own project as well.



resource "google_pubsub_subscription" "item_edited" 
name = "item_edited_subscription"
topic = "$google_pubsub_topic.item_edited.id"
project = "$module.offer-dev.gcp_project_id"



Error:



Error: Error applying plan:

1 error(s) occurred:

* google_pubsub_topic.item_edited: 1 error(s) occurred:

* google_pubsub_topic.item_edited: googleapi: Error 409: Resource already exists in the project (resource=item_edited)., alreadyExists









share|improve this question






























    0















    How to deal with resources existing in multiple projects. In this case I have 2 TF projects and have a shared topic in google pubsub. Following the google provider docs I created this configuration in the subscriber project. But it gives me a resource already exists error.



    resource "google_pubsub_topic" "item_edited" 
    project = "listing-dev"
    name = "item_edited"



    So this resource already exits in some other project but following the guides I created it our own project as well.



    resource "google_pubsub_subscription" "item_edited" 
    name = "item_edited_subscription"
    topic = "$google_pubsub_topic.item_edited.id"
    project = "$module.offer-dev.gcp_project_id"



    Error:



    Error: Error applying plan:

    1 error(s) occurred:

    * google_pubsub_topic.item_edited: 1 error(s) occurred:

    * google_pubsub_topic.item_edited: googleapi: Error 409: Resource already exists in the project (resource=item_edited)., alreadyExists









    share|improve this question


























      0












      0








      0








      How to deal with resources existing in multiple projects. In this case I have 2 TF projects and have a shared topic in google pubsub. Following the google provider docs I created this configuration in the subscriber project. But it gives me a resource already exists error.



      resource "google_pubsub_topic" "item_edited" 
      project = "listing-dev"
      name = "item_edited"



      So this resource already exits in some other project but following the guides I created it our own project as well.



      resource "google_pubsub_subscription" "item_edited" 
      name = "item_edited_subscription"
      topic = "$google_pubsub_topic.item_edited.id"
      project = "$module.offer-dev.gcp_project_id"



      Error:



      Error: Error applying plan:

      1 error(s) occurred:

      * google_pubsub_topic.item_edited: 1 error(s) occurred:

      * google_pubsub_topic.item_edited: googleapi: Error 409: Resource already exists in the project (resource=item_edited)., alreadyExists









      share|improve this question














      How to deal with resources existing in multiple projects. In this case I have 2 TF projects and have a shared topic in google pubsub. Following the google provider docs I created this configuration in the subscriber project. But it gives me a resource already exists error.



      resource "google_pubsub_topic" "item_edited" 
      project = "listing-dev"
      name = "item_edited"



      So this resource already exits in some other project but following the guides I created it our own project as well.



      resource "google_pubsub_subscription" "item_edited" 
      name = "item_edited_subscription"
      topic = "$google_pubsub_topic.item_edited.id"
      project = "$module.offer-dev.gcp_project_id"



      Error:



      Error: Error applying plan:

      1 error(s) occurred:

      * google_pubsub_topic.item_edited: 1 error(s) occurred:

      * google_pubsub_topic.item_edited: googleapi: Error 409: Resource already exists in the project (resource=item_edited)., alreadyExists






      google-cloud-platform terraform google-cloud-pubsub terraform-provider-gcp






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 3:34









      JehandadKJehandadK

      1,4003 gold badges21 silver badges39 bronze badges




      1,4003 gold badges21 silver badges39 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          1














          Topic's name should have this format:



          projects/<your_project>/topics/<your_topic_name>


          For more information, you could check the following link and/or try the API explorer.



          Hope it helps.






          share|improve this answer
































            0














            Actually, the correct answer is we need to use variables to explicitly define dependency in terraform config.



            https://learn.hashicorp.com/terraform/getting-started/dependencies.html



            By studying the resource attributes used in interpolation expressions, Terraform can automatically infer when one resource depends on another






            share|improve this answer



























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369386%2fterraform-topic-resource-already-exists-in-across-projects-how-to-handle-this%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              Topic's name should have this format:



              projects/<your_project>/topics/<your_topic_name>


              For more information, you could check the following link and/or try the API explorer.



              Hope it helps.






              share|improve this answer





























                1














                Topic's name should have this format:



                projects/<your_project>/topics/<your_topic_name>


                For more information, you could check the following link and/or try the API explorer.



                Hope it helps.






                share|improve this answer



























                  1












                  1








                  1







                  Topic's name should have this format:



                  projects/<your_project>/topics/<your_topic_name>


                  For more information, you could check the following link and/or try the API explorer.



                  Hope it helps.






                  share|improve this answer













                  Topic's name should have this format:



                  projects/<your_project>/topics/<your_topic_name>


                  For more information, you could check the following link and/or try the API explorer.



                  Hope it helps.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 27 at 15:31









                  F10F10

                  1,7172 gold badges6 silver badges15 bronze badges




                  1,7172 gold badges6 silver badges15 bronze badges


























                      0














                      Actually, the correct answer is we need to use variables to explicitly define dependency in terraform config.



                      https://learn.hashicorp.com/terraform/getting-started/dependencies.html



                      By studying the resource attributes used in interpolation expressions, Terraform can automatically infer when one resource depends on another






                      share|improve this answer





























                        0














                        Actually, the correct answer is we need to use variables to explicitly define dependency in terraform config.



                        https://learn.hashicorp.com/terraform/getting-started/dependencies.html



                        By studying the resource attributes used in interpolation expressions, Terraform can automatically infer when one resource depends on another






                        share|improve this answer



























                          0












                          0








                          0







                          Actually, the correct answer is we need to use variables to explicitly define dependency in terraform config.



                          https://learn.hashicorp.com/terraform/getting-started/dependencies.html



                          By studying the resource attributes used in interpolation expressions, Terraform can automatically infer when one resource depends on another






                          share|improve this answer













                          Actually, the correct answer is we need to use variables to explicitly define dependency in terraform config.



                          https://learn.hashicorp.com/terraform/getting-started/dependencies.html



                          By studying the resource attributes used in interpolation expressions, Terraform can automatically infer when one resource depends on another







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Apr 18 at 1:13









                          JehandadKJehandadK

                          1,4003 gold badges21 silver badges39 bronze badges




                          1,4003 gold badges21 silver badges39 bronze badges






























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369386%2fterraform-topic-resource-already-exists-in-across-projects-how-to-handle-this%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                              SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                              은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현