Skip to content

Commit 7864b92

Browse files
committed
use random function, pubsub, and bucket name so tests dont conflict
1 parent 6ae35e2 commit 7864b92

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

examples/pubsub_scheduled/main.tf

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,23 @@ provider "google-beta" {
2424
region = var.region
2525
}
2626

27+
resource "random_pet" "main" {
28+
length = 2
29+
separator = "-"
30+
}
31+
2732
module "pubsub_scheduled_example" {
2833
providers = {
2934
google = google-beta
3035
}
3136

3237
source = "../../"
3338
project_id = var.project_id
34-
job_name = "pubsub-example"
39+
job_name = "pubsub-example-${random_pet.main.id}"
3540
job_schedule = "*/5 * * * *"
3641
function_entry_point = "doSomething"
3742
function_source_directory = "${path.module}/function_source"
38-
function_name = "testfunction-foo"
43+
function_name = "testfunction-${random_pet.main.id}"
3944
region = var.region
40-
topic_name = "pubsub_example_topic"
45+
topic_name = "pubsub_example_topic_${random_pet.main.id}"
4146
}

0 commit comments

Comments
 (0)