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

Creating a firebase project uses the default project instead of the specified one #7427

Closed
v-morlock opened this issue Oct 5, 2020 · 4 comments

Comments

@v-morlock
Copy link

v-morlock commented Oct 5, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

0.13.4

Affected Resource(s)

  • google_firebase_project

Terraform Configuration Files

resource "random_string" "firebase" {
  length  = 3
  special = false
  upper   = false
  number  = false
}

resource "google_project" "firebase" {
  name       = "firebase"
  project_id = "firebase-${random_string.firebase.result}"
  provider   = google-beta

  org_id = "xxx"
}

resource "google_project_service" "firebase_api" {
  service                    = "firebase.googleapis.com"
  project                    = google_project.firebase.project_id
  disable_dependent_services = true
  provisioner "local-exec" {
    command = "sleep 15"
  }
}


resource "google_firebase_project" "firebase" {
  depends_on = [google_project_service.firebase_api]

  provider = google-beta
  project  = google_project.firebase.project_id
}

Debug Output

https://gist.github.com/v-morlock/e3d5dd8ad6f0db176f02d2ba8c9c6a10

Panic Output

Expected Behavior

Firebase shall be enabled in the project specified in google_firebase_project.project

Actual Behavior

According to the logs, the resource tried to enable firebase in the provider's default project.

Steps to Reproduce

  1. initialize the google provider with project A as default
  2. try to enable firebase in project B

Important Factoids

We are trying to enable firebase in a submodule.

@ghost ghost added the bug label Oct 5, 2020
@edwardmedia edwardmedia self-assigned this Oct 5, 2020
@edwardmedia
Copy link
Contributor

@v-morlock is this similar to #6377?
Can you add below code before google_firebase_project?

resource "null_resource" "delay" {
  provisioner "local-exec" {
    command = "sleep 60"
  }
  triggers = {
    "project" = "${google_project.project.id}"
  }
}

@edwardmedia
Copy link
Contributor

@v-morlock Is this still an issue?

@edwardmedia
Copy link
Contributor

@v-morlock I am closing this issue now. Feel free to reopen it if this is still an issue

@ghost
Copy link

ghost commented Nov 11, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Nov 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants