Skip to content

Commit

Permalink
Prevent gcp error:The queue cannot be created because a queue with th…
Browse files Browse the repository at this point in the history
…is name existed too recently
  • Loading branch information
Tereius committed Jul 30, 2024
1 parent 7c12aad commit f2714ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
resource "random_password" "task_queue_suffix" {
length = 5
upper = false
}

resource "google_cloud_tasks_queue" "autoscaler_tasks" {
name = "autoscaler-callback-queue"
name = "autoscaler-callback-queue-${random_password.task_queue_suffix.result}"
location = local.region
depends_on = [google_project_service.cloudtasks_api]

Expand Down

0 comments on commit f2714ae

Please sign in to comment.