Skip to content

Commit

Permalink
Add some wait time for IAM propagation before Firebase Realtime Datab…
Browse files Browse the repository at this point in the history
…ase is ready to be created. (#12526)

[upstream:06ac55f297b1b58a033034cdb39f7f65a043ff9c]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician committed Dec 10, 2024
1 parent 7ce0df3 commit 82be8fd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/12526.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
19 changes: 18 additions & 1 deletion website/docs/r/firebase_database_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,32 @@ resource "google_project" "default" {
}
}
resource "google_project_service" "firebase" {
provider = google-beta
project = google_project.default.project_id
service = "firebase.googleapis.com"
disable_on_destroy = false
}
resource "google_firebase_project" "default" {
provider = google-beta
project = google_project.default.project_id
depends_on = [google_project_service.firebase]
}
resource "google_project_service" "firebase_database" {
provider = google-beta
project = google_firebase_project.default.project
service = "firebasedatabase.googleapis.com"
disable_on_destroy = false
}
resource "time_sleep" "wait_60_seconds" {
create_duration = "60s"
depends_on = [google_project_service.firebase_database]
}
resource "google_firebase_database_instance" "default" {
Expand All @@ -86,7 +103,7 @@ resource "google_firebase_database_instance" "default" {
region = "us-central1"
instance_id = "rtdb-project-default-rtdb"
type = "DEFAULT_DATABASE"
depends_on = [google_project_service.firebase_database]
depends_on = [time_sleep.wait_60_seconds]
}
```

Expand Down

0 comments on commit 82be8fd

Please sign in to comment.